home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / gfx / misc / gnuplot-3.7src.lha / gnuplot-3.7src / gnuplot-3.7.lha / gnuplot-3.7 / configure < prev    next >
Text File  |  1999-01-14  |  142KB  |  4,916 lines

  1. #! /bin/sh
  2.  
  3. # From configure.in Revision: 1.90 
  4.  
  5.  
  6.  
  7. # Do all the work for Automake.  This macro actually does too much --
  8. # some checks are only needed if your package does certain things.
  9. # But this isn't really a big deal.
  10.  
  11. # serial 1
  12.  
  13.  
  14.  
  15.  
  16. #
  17. # Check to make sure that the build environment is sane.
  18. #
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. # serial 1
  26.  
  27.  
  28.  
  29.  
  30. # serial 1
  31.  
  32. # @defmac AC_PROG_CC_STDC
  33. # @maindex PROG_CC_STDC
  34. # @ovindex CC
  35. # If the C compiler in not in ANSI C mode by default, try to add an option
  36. # to output variable @code{CC} to make it so.  This macro tries various
  37. # options that select ANSI C on some system or another.  It considers the
  38. # compiler to be in ANSI C mode if it handles function prototypes correctly.
  39. #
  40. # If you use this macro, you should check after calling it whether the C
  41. # compiler has been set to accept ANSI C; if not, the shell variable
  42. # @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
  43. # code in ANSI C, you can make an un-ANSIfied copy of it by using the
  44. # program @code{ansi2knr}, which comes with Ghostscript.
  45. # @end defmac
  46.  
  47.  
  48.  
  49.  
  50. # serial 1
  51.  
  52.  
  53.  
  54.  
  55.  
  56. # serial 1
  57.  
  58.  
  59.  
  60.  
  61.  
  62. # serial 1
  63.  
  64.  
  65.  
  66.  
  67. # serial 1
  68.  
  69.  
  70.  
  71.  
  72.  
  73. # serial 1
  74.  
  75.  
  76.  
  77.  
  78. # Guess values for system-dependent variables and create Makefiles.
  79. # Generated automatically using autoconf version 2.13 
  80. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  81. #
  82. # This configure script is free software; the Free Software Foundation
  83. # gives unlimited permission to copy, distribute and modify it.
  84.  
  85. # Defaults:
  86. ac_help=
  87. ac_default_prefix=/usr/local
  88. # Any additions from configure.in:
  89. ac_help="$ac_help
  90.   --with-readline         use the included minimal readline function (default)
  91.   --without-readline      do not use the included readline function"
  92. ac_help="$ac_help
  93.   --with-gnu-readline     use the GNU readline library
  94.   --with-gnu-readline=PATH        Specify the location of GNU readline"
  95. ac_help="$ac_help
  96.   --with-plot             use the Unix plot library
  97.   --with-plot=PATH                Specify the location of GNU libplot"
  98. ac_help="$ac_help
  99.   --with-gd               enable gif terminal with Tom Boutell's gd library
  100.                           (requires GD library)
  101.   --with-gd=PATH                  Specify the location of libgd"
  102. ac_help="$ac_help
  103.   --with-png              enable png terminal
  104.                           (requires libpng and libz)
  105.   --with-png=PATH                 Specify the location of libpng"
  106. ac_help="$ac_help
  107.   --with-cwdrc            check current directory for .gnuplot file,
  108.                           normally disabled for security reasons"
  109. ac_help="$ac_help
  110.   --with-lasergnu         install lasergnu printer script"
  111. ac_help="$ac_help
  112.   --without-linux-vga     do not use the Linux console driver
  113.                           (requires Linux SVGAlib /usr/lib/libvga)"
  114. ac_help="$ac_help
  115.   --enable-apollo         Apollo Graphics Primitive Resource"
  116. ac_help="$ac_help
  117.   --enable-gpr            Apollo Graphics Primitive Resource (fixed-size window)"
  118. ac_help="$ac_help
  119.   --enable-cgi            enable CGI terminal (SCO only)"
  120. ac_help="$ac_help
  121.   --enable-iris           enable IRIS terminal (IRIS4D only)"
  122. ac_help="$ac_help
  123.   --enable-mgr            enable MGR terminal"
  124. ac_help="$ac_help
  125.   --enable-rgip           enable Redwood Graphics Interface Protocol"
  126. ac_help="$ac_help
  127.   --enable-sun            enable sunview terminal (Sun only)"
  128. ac_help="$ac_help
  129.   --enable-unixpc         enable unixpc terminal (ATT 3b1 or ATT 7300)"
  130. ac_help="$ac_help
  131.   --enable-system-time    use the system time routines in time.c"
  132. ac_help="$ac_help
  133.   --with-x                use the X Window System"
  134.  
  135. # Initialize some variables set by options.
  136. # The variables have the same names as the options, with
  137. # dashes changed to underlines.
  138. build=NONE
  139. cache_file=./config.cache
  140. exec_prefix=NONE
  141. host=NONE
  142. no_create=
  143. nonopt=NONE
  144. no_recursion=
  145. prefix=NONE
  146. program_prefix=NONE
  147. program_suffix=NONE
  148. program_transform_name=s,x,x,
  149. silent=
  150. site=
  151. srcdir=
  152. target=NONE
  153. verbose=
  154. x_includes=NONE
  155. x_libraries=NONE
  156. bindir='${exec_prefix}/bin'
  157. sbindir='${exec_prefix}/sbin'
  158. libexecdir='${exec_prefix}/libexec'
  159. datadir='${prefix}/share'
  160. sysconfdir='${prefix}/etc'
  161. sharedstatedir='${prefix}/com'
  162. localstatedir='${prefix}/var'
  163. libdir='${exec_prefix}/lib'
  164. includedir='${prefix}/include'
  165. oldincludedir='/usr/include'
  166. infodir='${prefix}/info'
  167. mandir='${prefix}/man'
  168.  
  169. # Initialize some other variables.
  170. subdirs=
  171. MFLAGS= MAKEFLAGS=
  172. SHELL=${CONFIG_SHELL-/bin/sh}
  173. # Maximum number of lines to put in a shell here document.
  174. ac_max_here_lines=12
  175.  
  176. ac_prev=
  177. for ac_option
  178. do
  179.  
  180.   # If the previous option needs an argument, assign it.
  181.   if test -n "$ac_prev"; then
  182.     eval "$ac_prev=\$ac_option"
  183.     ac_prev=
  184.     continue
  185.   fi
  186.  
  187.   case "$ac_option" in
  188.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  189.   *) ac_optarg= ;;
  190.   esac
  191.  
  192.   # Accept the important Cygnus configure options, so we can diagnose typos.
  193.  
  194.   case "$ac_option" in
  195.  
  196.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  197.     ac_prev=bindir ;;
  198.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  199.     bindir="$ac_optarg" ;;
  200.  
  201.   -build | --build | --buil | --bui | --bu)
  202.     ac_prev=build ;;
  203.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  204.     build="$ac_optarg" ;;
  205.  
  206.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  207.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  208.     ac_prev=cache_file ;;
  209.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  210.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  211.     cache_file="$ac_optarg" ;;
  212.  
  213.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  214.     ac_prev=datadir ;;
  215.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  216.   | --da=*)
  217.     datadir="$ac_optarg" ;;
  218.  
  219.   -disable-* | --disable-*)
  220.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  221.     # Reject names that are not valid shell variable names.
  222.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  223.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  224.     fi
  225.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  226.     eval "enable_${ac_feature}=no" ;;
  227.  
  228.   -enable-* | --enable-*)
  229.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  230.     # Reject names that are not valid shell variable names.
  231.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  232.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  233.     fi
  234.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  235.     case "$ac_option" in
  236.       *=*) ;;
  237.       *) ac_optarg=yes ;;
  238.     esac
  239.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  240.  
  241.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  242.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  243.   | --exec | --exe | --ex)
  244.     ac_prev=exec_prefix ;;
  245.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  246.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  247.   | --exec=* | --exe=* | --ex=*)
  248.     exec_prefix="$ac_optarg" ;;
  249.  
  250.   -gas | --gas | --ga | --g)
  251.     # Obsolete; use --with-gas.
  252.     with_gas=yes ;;
  253.  
  254.   -help | --help | --hel | --he)
  255.     # Omit some internal or obsolete options to make the list less imposing.
  256.     # This message is too long to be a string in the A/UX 3.1 sh.
  257.     cat << EOF
  258. Usage: configure [options] [host]
  259. Options: [defaults in brackets after descriptions]
  260. Configuration:
  261.   --cache-file=FILE       cache test results in FILE
  262.   --help                  print this message
  263.   --no-create             do not create output files
  264.   --quiet, --silent       do not print \`checking...' messages
  265.   --version               print the version of autoconf that created configure
  266. Directory and file names:
  267.   --prefix=PREFIX         install architecture-independent files in PREFIX
  268.                           [$ac_default_prefix]
  269.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  270.                           [same as prefix]
  271.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  272.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  273.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  274.   --datadir=DIR           read-only architecture-independent data in DIR
  275.                           [PREFIX/share]
  276.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  277.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  278.                           [PREFIX/com]
  279.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  280.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  281.   --includedir=DIR        C header files in DIR [PREFIX/include]
  282.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  283.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  284.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  285.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  286.   --program-prefix=PREFIX prepend PREFIX to installed program names
  287.   --program-suffix=SUFFIX append SUFFIX to installed program names
  288.   --program-transform-name=PROGRAM
  289.                           run sed PROGRAM on installed program names
  290. EOF
  291.     cat << EOF
  292. Host type:
  293.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  294.   --host=HOST             configure for HOST [guessed]
  295.   --target=TARGET         configure for TARGET [TARGET=HOST]
  296. Features and packages:
  297.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  298.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  299.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  300.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  301.   --x-includes=DIR        X include files are in DIR
  302.   --x-libraries=DIR       X library files are in DIR
  303. EOF
  304.     if test -n "$ac_help"; then
  305.       echo "--enable and --with options recognized:$ac_help"
  306.     fi
  307.     exit 0 ;;
  308.  
  309.   -host | --host | --hos | --ho)
  310.     ac_prev=host ;;
  311.   -host=* | --host=* | --hos=* | --ho=*)
  312.     host="$ac_optarg" ;;
  313.  
  314.   -includedir | --includedir | --includedi | --included | --include \
  315.   | --includ | --inclu | --incl | --inc)
  316.     ac_prev=includedir ;;
  317.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  318.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  319.     includedir="$ac_optarg" ;;
  320.  
  321.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  322.     ac_prev=infodir ;;
  323.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  324.     infodir="$ac_optarg" ;;
  325.  
  326.   -libdir | --libdir | --libdi | --libd)
  327.     ac_prev=libdir ;;
  328.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  329.     libdir="$ac_optarg" ;;
  330.  
  331.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  332.   | --libexe | --libex | --libe)
  333.     ac_prev=libexecdir ;;
  334.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  335.   | --libexe=* | --libex=* | --libe=*)
  336.     libexecdir="$ac_optarg" ;;
  337.  
  338.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  339.   | --localstate | --localstat | --localsta | --localst \
  340.   | --locals | --local | --loca | --loc | --lo)
  341.     ac_prev=localstatedir ;;
  342.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  343.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  344.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  345.     localstatedir="$ac_optarg" ;;
  346.  
  347.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  348.     ac_prev=mandir ;;
  349.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  350.     mandir="$ac_optarg" ;;
  351.  
  352.   -nfp | --nfp | --nf)
  353.     # Obsolete; use --without-fp.
  354.     with_fp=no ;;
  355.  
  356.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  357.   | --no-cr | --no-c)
  358.     no_create=yes ;;
  359.  
  360.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  361.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  362.     no_recursion=yes ;;
  363.  
  364.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  365.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  366.   | --oldin | --oldi | --old | --ol | --o)
  367.     ac_prev=oldincludedir ;;
  368.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  369.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  370.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  371.     oldincludedir="$ac_optarg" ;;
  372.  
  373.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  374.     ac_prev=prefix ;;
  375.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  376.     prefix="$ac_optarg" ;;
  377.  
  378.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  379.   | --program-pre | --program-pr | --program-p)
  380.     ac_prev=program_prefix ;;
  381.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  382.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  383.     program_prefix="$ac_optarg" ;;
  384.  
  385.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  386.   | --program-suf | --program-su | --program-s)
  387.     ac_prev=program_suffix ;;
  388.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  389.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  390.     program_suffix="$ac_optarg" ;;
  391.  
  392.   -program-transform-name | --program-transform-name \
  393.   | --program-transform-nam | --program-transform-na \
  394.   | --program-transform-n | --program-transform- \
  395.   | --program-transform | --program-transfor \
  396.   | --program-transfo | --program-transf \
  397.   | --program-trans | --program-tran \
  398.   | --progr-tra | --program-tr | --program-t)
  399.     ac_prev=program_transform_name ;;
  400.   -program-transform-name=* | --program-transform-name=* \
  401.   | --program-transform-nam=* | --program-transform-na=* \
  402.   | --program-transform-n=* | --program-transform-=* \
  403.   | --program-transform=* | --program-transfor=* \
  404.   | --program-transfo=* | --program-transf=* \
  405.   | --program-trans=* | --program-tran=* \
  406.   | --progr-tra=* | --program-tr=* | --program-t=*)
  407.     program_transform_name="$ac_optarg" ;;
  408.  
  409.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  410.   | -silent | --silent | --silen | --sile | --sil)
  411.     silent=yes ;;
  412.  
  413.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  414.     ac_prev=sbindir ;;
  415.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  416.   | --sbi=* | --sb=*)
  417.     sbindir="$ac_optarg" ;;
  418.  
  419.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  420.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  421.   | --sharedst | --shareds | --shared | --share | --shar \
  422.   | --sha | --sh)
  423.     ac_prev=sharedstatedir ;;
  424.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  425.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  426.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  427.   | --sha=* | --sh=*)
  428.     sharedstatedir="$ac_optarg" ;;
  429.  
  430.   -site | --site | --sit)
  431.     ac_prev=site ;;
  432.   -site=* | --site=* | --sit=*)
  433.     site="$ac_optarg" ;;
  434.  
  435.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  436.     ac_prev=srcdir ;;
  437.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  438.     srcdir="$ac_optarg" ;;
  439.  
  440.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  441.   | --syscon | --sysco | --sysc | --sys | --sy)
  442.     ac_prev=sysconfdir ;;
  443.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  444.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  445.     sysconfdir="$ac_optarg" ;;
  446.  
  447.   -target | --target | --targe | --targ | --tar | --ta | --t)
  448.     ac_prev=target ;;
  449.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  450.     target="$ac_optarg" ;;
  451.  
  452.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  453.     verbose=yes ;;
  454.  
  455.   -version | --version | --versio | --versi | --vers)
  456.     echo "configure generated by autoconf version 2.13"
  457.     exit 0 ;;
  458.  
  459.   -with-* | --with-*)
  460.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  461.     # Reject names that are not valid shell variable names.
  462.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  463.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  464.     fi
  465.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  466.     case "$ac_option" in
  467.       *=*) ;;
  468.       *) ac_optarg=yes ;;
  469.     esac
  470.     eval "with_${ac_package}='$ac_optarg'" ;;
  471.  
  472.   -without-* | --without-*)
  473.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  474.     # Reject names that are not valid shell variable names.
  475.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  476.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  477.     fi
  478.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  479.     eval "with_${ac_package}=no" ;;
  480.  
  481.   --x)
  482.     # Obsolete; use --with-x.
  483.     with_x=yes ;;
  484.  
  485.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  486.   | --x-incl | --x-inc | --x-in | --x-i)
  487.     ac_prev=x_includes ;;
  488.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  489.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  490.     x_includes="$ac_optarg" ;;
  491.  
  492.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  493.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  494.     ac_prev=x_libraries ;;
  495.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  496.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  497.     x_libraries="$ac_optarg" ;;
  498.  
  499.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  500.     ;;
  501.  
  502.   *)
  503.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  504.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  505.     fi
  506.     if test "x$nonopt" != xNONE; then
  507.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  508.     fi
  509.     nonopt="$ac_option"
  510.     ;;
  511.  
  512.   esac
  513. done
  514.  
  515. if test -n "$ac_prev"; then
  516.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  517. fi
  518.  
  519. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  520.  
  521. # File descriptor usage:
  522. # 0 standard input
  523. # 1 file creation
  524. # 2 errors and warnings
  525. # 3 some systems may open it to /dev/tty
  526. # 4 used on the Kubota Titan
  527. # 6 checking for... messages and results
  528. # 5 compiler messages saved in config.log
  529. if test "$silent" = yes; then
  530.   exec 6>/dev/null
  531. else
  532.   exec 6>&1
  533. fi
  534. exec 5>./config.log
  535.  
  536. echo "\
  537. This file contains any messages produced by compilers while
  538. running configure, to aid debugging if configure makes a mistake.
  539. " 1>&5
  540.  
  541. # Strip out --no-create and --no-recursion so they do not pile up.
  542. # Also quote any args containing shell metacharacters.
  543. ac_configure_args=
  544. for ac_arg
  545. do
  546.   case "$ac_arg" in
  547.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  548.   | --no-cr | --no-c) ;;
  549.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  550.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  551.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  552.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  553.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  554.   esac
  555. done
  556.  
  557. # NLS nuisances.
  558. # Only set these to C if already set.  These must not be set unconditionally
  559. # because not all systems understand e.g. LANG=C (notably SCO).
  560. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  561. # Non-C LC_CTYPE values break the ctype check.
  562. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  563. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  564. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  565. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  566.  
  567. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  568. rm -rf conftest* confdefs.h
  569. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  570. echo > confdefs.h
  571.  
  572. # A filename unique to this package, relative to the directory that
  573. # configure is in, which we can look for to find out if srcdir is correct.
  574. ac_unique_file=graphics.c
  575.  
  576. # Find the source files, if location was not specified.
  577. if test -z "$srcdir"; then
  578.   ac_srcdir_defaulted=yes
  579.   # Try the directory containing this script, then its parent.
  580.   ac_prog=$0
  581.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  582.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  583.   srcdir=$ac_confdir
  584.   if test ! -r $srcdir/$ac_unique_file; then
  585.     srcdir=..
  586.   fi
  587. else
  588.   ac_srcdir_defaulted=no
  589. fi
  590. if test ! -r $srcdir/$ac_unique_file; then
  591.   if test "$ac_srcdir_defaulted" = yes; then
  592.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  593.   else
  594.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  595.   fi
  596. fi
  597. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  598.  
  599. # Prefer explicitly selected file to automatically selected ones.
  600. if test -z "$CONFIG_SITE"; then
  601.   if test "x$prefix" != xNONE; then
  602.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  603.   else
  604.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  605.   fi
  606. fi
  607. for ac_site_file in $CONFIG_SITE; do
  608.   if test -r "$ac_site_file"; then
  609.     echo "loading site script $ac_site_file"
  610.     . "$ac_site_file"
  611.   fi
  612. done
  613.  
  614. if test -r "$cache_file"; then
  615.   echo "loading cache $cache_file"
  616.   . $cache_file
  617. else
  618.   echo "creating cache $cache_file"
  619.   > $cache_file
  620. fi
  621.  
  622. ac_ext=c
  623. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  624. ac_cpp='$CPP $CPPFLAGS'
  625. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  626. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  627. cross_compiling=$ac_cv_prog_cc_cross
  628.  
  629. ac_exeext=
  630. ac_objext=o
  631. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  632.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  633.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  634.     ac_n= ac_c='
  635. ' ac_t='    '
  636.   else
  637.     ac_n=-n ac_c= ac_t=
  638.   fi
  639. else
  640.   ac_n= ac_c='\c' ac_t=
  641. fi
  642.  
  643.  
  644. VERSION=`sed -n 's/.*version.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '`
  645. ac_aux_dir=
  646. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  647.   if test -f $ac_dir/install-sh; then
  648.     ac_aux_dir=$ac_dir
  649.     ac_install_sh="$ac_aux_dir/install-sh -c"
  650.     break
  651.   elif test -f $ac_dir/install.sh; then
  652.     ac_aux_dir=$ac_dir
  653.     ac_install_sh="$ac_aux_dir/install.sh -c"
  654.     break
  655.   fi
  656. done
  657. if test -z "$ac_aux_dir"; then
  658.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  659. fi
  660. ac_config_guess=$ac_aux_dir/config.guess
  661. ac_config_sub=$ac_aux_dir/config.sub
  662. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  663.  
  664. # Find a good install program.  We prefer a C program (faster),
  665. # so one script is as good as another.  But avoid the broken or
  666. # incompatible versions:
  667. # SysV /etc/install, /usr/sbin/install
  668. # SunOS /usr/etc/install
  669. # IRIX /sbin/install
  670. # AIX /bin/install
  671. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  672. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  673. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  674. # ./install, which can be erroneously created by make from ./install.sh.
  675. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  676. echo "configure:677: checking for a BSD compatible install" >&5
  677. if test -z "$INSTALL"; then
  678. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  679.   echo $ac_n "(cached) $ac_c" 1>&6
  680. else
  681.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS=":"
  682.   for ac_dir in $PATH; do
  683.     # Account for people who put trailing slashes in PATH elements.
  684.     case "$ac_dir/" in
  685.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  686.     *)
  687.       # OSF1 and SCO ODT 3.0 have their own names for install.
  688.       # Don't use installbsd from OSF since it installs stuff as root
  689.       # by default.
  690.       for ac_prog in ginstall scoinst install; do
  691.         if test -f $ac_dir/$ac_prog; then
  692.       if test $ac_prog = install &&
  693.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  694.         # AIX install.  It has an incompatible calling convention.
  695.         :
  696.       else
  697.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  698.         break 2
  699.       fi
  700.     fi
  701.       done
  702.       ;;
  703.     esac
  704.   done
  705.   IFS="$ac_save_IFS"
  706.  
  707. fi
  708.   if test "${ac_cv_path_install+set}" = set; then
  709.     INSTALL="$ac_cv_path_install"
  710.   else
  711.     # As a last resort, use the slow shell script.  We don't cache a
  712.     # path for INSTALL within a source directory, because that will
  713.     # break other packages using the cache if that directory is
  714.     # removed, or if the path is relative.
  715.     INSTALL="$ac_install_sh"
  716.   fi
  717. fi
  718. echo "$ac_t""$INSTALL" 1>&6
  719.  
  720. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  721. # It thinks the first close brace ends the variable substitution.
  722. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  723.  
  724. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  725.  
  726. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  727.  
  728. echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
  729. echo "configure:730: checking whether build environment is sane" >&5
  730. # Just in case
  731. sleep 1
  732. echo timestamp > conftestfile
  733. # Do `set' in a subshell so we don't clobber the current shell's
  734. # arguments.  Must try -L first in case configure is actually a
  735. # symlink; some systems play weird games with the mod time of symlinks
  736. # (eg FreeBSD returns the mod time of the symlink's containing
  737. # directory).
  738. if (
  739.    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  740.    if test "$*" = "X"; then
  741.       # -L didn't work.
  742.       set X `ls -t $srcdir/configure conftestfile`
  743.    fi
  744.    if test "$*" != "X $srcdir/configure conftestfile" \
  745.       && test "$*" != "X conftestfile $srcdir/configure"; then
  746.  
  747.       # If neither matched, then we have a broken ls.  This can happen
  748.       # if, for instance, CONFIG_SHELL is bash and it inherits a
  749.       # broken ls alias from the environment.  This has actually
  750.       # happened.  Such a system could not be considered "sane".
  751.       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
  752. alias in your environment" 1>&2; exit 1; }
  753.    fi
  754.  
  755.    test "$2" = conftestfile
  756.    )
  757. then
  758.    # Ok.
  759.    :
  760. else
  761.    { echo "configure: error: newly created file is older than distributed files!
  762. Check your system clock" 1>&2; exit 1; }
  763. fi
  764. rm -f conftest*
  765. echo "$ac_t""yes" 1>&6
  766. if test "$program_transform_name" = s,x,x,; then
  767.   program_transform_name=
  768. else
  769.   # Double any \ or $.  echo might interpret backslashes.
  770.   cat <<\EOF_SED > conftestsed
  771. s,\\,\\\\,g; s,\$,$$,g
  772. EOF_SED
  773.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  774.   rm -f conftestsed
  775. fi
  776. test "$program_prefix" != NONE &&
  777.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  778. # Use a double $ so make ignores it.
  779. test "$program_suffix" != NONE &&
  780.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  781.  
  782. # sed with no file args requires a program.
  783. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  784.  
  785. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  786. echo "configure:787: checking whether ${MAKE-make} sets \${MAKE}" >&5
  787. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  788. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  789.   echo $ac_n "(cached) $ac_c" 1>&6
  790. else
  791.   cat > conftestmake <<\EOF
  792. all:
  793.     @echo 'ac_maketemp="${MAKE}"'
  794. EOF
  795. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  796. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  797. if test -n "$ac_maketemp"; then
  798.   eval ac_cv_prog_make_${ac_make}_set=yes
  799. else
  800.   eval ac_cv_prog_make_${ac_make}_set=no
  801. fi
  802. rm -f conftestmake
  803. fi
  804. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  805.   echo "$ac_t""yes" 1>&6
  806.   SET_MAKE=
  807. else
  808.   echo "$ac_t""no" 1>&6
  809.   SET_MAKE="MAKE=${MAKE-make}"
  810. fi
  811.  
  812.  
  813. PACKAGE=gnuplot
  814.  
  815. VERSION=$VERSION
  816.  
  817. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  818.   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
  819. fi
  820. cat >> confdefs.h <<EOF
  821. #define PACKAGE "$PACKAGE"
  822. EOF
  823.  
  824. cat >> confdefs.h <<EOF
  825. #define VERSION "$VERSION"
  826. EOF
  827.  
  828.  
  829.  
  830. missing_dir=`cd $ac_aux_dir && pwd`
  831. echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
  832. echo "configure:833: checking for working aclocal" >&5
  833. # Run test in a subshell; some versions of sh will print an error if
  834. # an executable is not found, even if stderr is redirected.
  835. # Redirect stdin to placate older versions of autoconf.  Sigh.
  836. if (aclocal --version) < /dev/null > /dev/null 2>&1; then
  837.    ACLOCAL=aclocal
  838.    echo "$ac_t""found" 1>&6
  839. else
  840.    ACLOCAL="$missing_dir/missing aclocal"
  841.    echo "$ac_t""missing" 1>&6
  842. fi
  843.  
  844. echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
  845. echo "configure:846: checking for working autoconf" >&5
  846. # Run test in a subshell; some versions of sh will print an error if
  847. # an executable is not found, even if stderr is redirected.
  848. # Redirect stdin to placate older versions of autoconf.  Sigh.
  849. if (autoconf --version) < /dev/null > /dev/null 2>&1; then
  850.    AUTOCONF=autoconf
  851.    echo "$ac_t""found" 1>&6
  852. else
  853.    AUTOCONF="$missing_dir/missing autoconf"
  854.    echo "$ac_t""missing" 1>&6
  855. fi
  856.  
  857. echo $ac_n "checking for working automake""... $ac_c" 1>&6
  858. echo "configure:859: checking for working automake" >&5
  859. # Run test in a subshell; some versions of sh will print an error if
  860. # an executable is not found, even if stderr is redirected.
  861. # Redirect stdin to placate older versions of autoconf.  Sigh.
  862. if (automake --version) < /dev/null > /dev/null 2>&1; then
  863.    AUTOMAKE=automake
  864.    echo "$ac_t""found" 1>&6
  865. else
  866.    AUTOMAKE="$missing_dir/missing automake"
  867.    echo "$ac_t""missing" 1>&6
  868. fi
  869.  
  870. echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
  871. echo "configure:872: checking for working autoheader" >&5
  872. # Run test in a subshell; some versions of sh will print an error if
  873. # an executable is not found, even if stderr is redirected.
  874. # Redirect stdin to placate older versions of autoconf.  Sigh.
  875. if (autoheader --version) < /dev/null > /dev/null 2>&1; then
  876.    AUTOHEADER=autoheader
  877.    echo "$ac_t""found" 1>&6
  878. else
  879.    AUTOHEADER="$missing_dir/missing autoheader"
  880.    echo "$ac_t""missing" 1>&6
  881. fi
  882.  
  883. echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
  884. echo "configure:885: checking for working makeinfo" >&5
  885. # Run test in a subshell; some versions of sh will print an error if
  886. # an executable is not found, even if stderr is redirected.
  887. # Redirect stdin to placate older versions of autoconf.  Sigh.
  888. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
  889.    MAKEINFO=makeinfo
  890.    echo "$ac_t""found" 1>&6
  891. else
  892.    MAKEINFO="$missing_dir/missing makeinfo"
  893.    echo "$ac_t""missing" 1>&6
  894. fi
  895.  
  896.  
  897.  
  898.  
  899.  
  900. # Check whether --with-readline or --without-readline was given.
  901. if test "${with_readline+set}" = set; then
  902.   withval="$with_readline"
  903.   :
  904. else
  905.   test -z "$with_readline" && with_readline=yes
  906.  
  907. fi
  908.  
  909. # Check whether --with-gnu-readline or --without-gnu-readline was given.
  910. if test "${with_gnu_readline+set}" = set; then
  911.   withval="$with_gnu_readline"
  912.   :
  913. else
  914.   test -z "$with_gnu_readline" && with_gnu_readline=no
  915.  
  916. fi
  917.  
  918. # Check whether --with-plot or --without-plot was given.
  919. if test "${with_plot+set}" = set; then
  920.   withval="$with_plot"
  921.   :
  922. else
  923.   test -z "$with_plot" && with_plot=no
  924.  
  925. fi
  926.  
  927. # Check whether --with-gd or --without-gd was given.
  928. if test "${with_gd+set}" = set; then
  929.   withval="$with_gd"
  930.   :
  931. else
  932.   test -z "$with_gd" && with_gd=yes
  933.  
  934. fi
  935.  
  936. # Check whether --with-png or --without-png was given.
  937. if test "${with_png+set}" = set; then
  938.   withval="$with_png"
  939.   :
  940. else
  941.   test -z "$with_png" && with_png=yes
  942.  
  943. fi
  944.  
  945. # Check whether --with-cwdrc or --without-cwdrc was given.
  946. if test "${with_cwdrc+set}" = set; then
  947.   withval="$with_cwdrc"
  948.   test "$withval" = no && cat >> confdefs.h <<\EOF
  949. #define NOCWDRC 1
  950. EOF
  951.  
  952. else
  953.   cat >> confdefs.h <<\EOF
  954. #define NOCWDRC 1
  955. EOF
  956.  
  957.  
  958. fi
  959.  
  960. # Check whether --with-lasergnu or --without-lasergnu was given.
  961. if test "${with_lasergnu+set}" = set; then
  962.   withval="$with_lasergnu"
  963.   if test "$withval" = yes; then LASERGNU=lasergnu_install; \
  964. else LASERGNU=lasergnu_noinstall; fi
  965. else
  966.   LASERGNU=lasergnu_noinstall
  967.  
  968. fi
  969.  
  970. # Check whether --with-linux-vga or --without-linux-vga was given.
  971. if test "${with_linux_vga+set}" = set; then
  972.   withval="$with_linux_vga"
  973.   :
  974. else
  975.   test -z "$with_linux_vga" && with_linux_vga=yes
  976.  
  977. fi
  978.  
  979. # Check whether --enable-apollo or --disable-apollo was given.
  980. if test "${enable_apollo+set}" = set; then
  981.   enableval="$enable_apollo"
  982.   :
  983. else
  984.   test -z "$enable_apollo" && enable_apollo=no
  985.  
  986. fi
  987.  
  988. # Check whether --enable-gpr or --disable-gpr was given.
  989. if test "${enable_gpr+set}" = set; then
  990.   enableval="$enable_gpr"
  991.   :
  992. else
  993.   test -z "$enable_gpr" && enable_gpr=no
  994.  
  995. fi
  996.  
  997. # Check whether --enable-cgi or --disable-cgi was given.
  998. if test "${enable_cgi+set}" = set; then
  999.   enableval="$enable_cgi"
  1000.   :
  1001. else
  1002.   test -z "$enable_cgi" && enable_cgi=no
  1003.  
  1004. fi
  1005.  
  1006. # Check whether --enable-iris or --disable-iris was given.
  1007. if test "${enable_iris+set}" = set; then
  1008.   enableval="$enable_iris"
  1009.   :
  1010. else
  1011.   test -z "$enable_iris" && enable_iris=no
  1012.  
  1013. fi
  1014.  
  1015. # Check whether --enable-mgr or --disable-mgr was given.
  1016. if test "${enable_mgr+set}" = set; then
  1017.   enableval="$enable_mgr"
  1018.   :
  1019. else
  1020.   test -z "$enable_mgr" && enable_mgr=no
  1021.  
  1022. fi
  1023.  
  1024. # Check whether --enable-rgip or --disable-rgip was given.
  1025. if test "${enable_rgip+set}" = set; then
  1026.   enableval="$enable_rgip"
  1027.   :
  1028. else
  1029.   test -z "$enable_rgip" && enable_rgip=no
  1030.  
  1031. fi
  1032.  
  1033. # Check whether --enable-sun or --disable-sun was given.
  1034. if test "${enable_sun+set}" = set; then
  1035.   enableval="$enable_sun"
  1036.   :
  1037. else
  1038.   test -z "$enable_sun" && enable_sun=no
  1039.  
  1040. fi
  1041.  
  1042. # Check whether --enable-unixpc or --disable-unixpc was given.
  1043. if test "${enable_unixpc+set}" = set; then
  1044.   enableval="$enable_unixpc"
  1045.   :
  1046. else
  1047.   test -z "$enable_unixpc" && enable_unixpc=no
  1048.  
  1049. fi
  1050.  
  1051. # Check whether --enable-system-time or --disable-system-time was given.
  1052. if test "${enable_system_time+set}" = set; then
  1053.   enableval="$enable_system_time"
  1054.   :
  1055. else
  1056.   test -z "$enable_system_time" && enable_system_time=no
  1057.  
  1058. fi
  1059.  
  1060.  
  1061. # Extract the first word of "gcc", so it can be a program name with args.
  1062. set dummy gcc; ac_word=$2
  1063. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1064. echo "configure:1065: checking for $ac_word" >&5
  1065. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1066.   echo $ac_n "(cached) $ac_c" 1>&6
  1067. else
  1068.   if test -n "$CC"; then
  1069.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1070. else
  1071.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1072.   ac_dummy="$PATH"
  1073.   for ac_dir in $ac_dummy; do
  1074.     test -z "$ac_dir" && ac_dir=.
  1075.     if test -f $ac_dir/$ac_word; then
  1076.       ac_cv_prog_CC="gcc"
  1077.       break
  1078.     fi
  1079.   done
  1080.   IFS="$ac_save_ifs"
  1081. fi
  1082. fi
  1083. CC="$ac_cv_prog_CC"
  1084. if test -n "$CC"; then
  1085.   echo "$ac_t""$CC" 1>&6
  1086. else
  1087.   echo "$ac_t""no" 1>&6
  1088. fi
  1089.  
  1090. if test -z "$CC"; then
  1091.   # Extract the first word of "cc", so it can be a program name with args.
  1092. set dummy cc; ac_word=$2
  1093. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1094. echo "configure:1095: checking for $ac_word" >&5
  1095. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1096.   echo $ac_n "(cached) $ac_c" 1>&6
  1097. else
  1098.   if test -n "$CC"; then
  1099.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1100. else
  1101.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1102.   ac_prog_rejected=no
  1103.   ac_dummy="$PATH"
  1104.   for ac_dir in $ac_dummy; do
  1105.     test -z "$ac_dir" && ac_dir=.
  1106.     if test -f $ac_dir/$ac_word; then
  1107.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  1108.         ac_prog_rejected=yes
  1109.     continue
  1110.       fi
  1111.       ac_cv_prog_CC="cc"
  1112.       break
  1113.     fi
  1114.   done
  1115.   IFS="$ac_save_ifs"
  1116. if test $ac_prog_rejected = yes; then
  1117.   # We found a bogon in the path, so make sure we never use it.
  1118.   set dummy $ac_cv_prog_CC
  1119.   shift
  1120.   if test $# -gt 0; then
  1121.     # We chose a different compiler from the bogus one.
  1122.     # However, it has the same basename, so the bogon will be chosen
  1123.     # first if we set CC to just the basename; use the full file name.
  1124.     shift
  1125.     set dummy "$ac_dir/$ac_word" "$@"
  1126.     shift
  1127.     ac_cv_prog_CC="$@"
  1128.   fi
  1129. fi
  1130. fi
  1131. fi
  1132. CC="$ac_cv_prog_CC"
  1133. if test -n "$CC"; then
  1134.   echo "$ac_t""$CC" 1>&6
  1135. else
  1136.   echo "$ac_t""no" 1>&6
  1137. fi
  1138.  
  1139.   if test -z "$CC"; then
  1140.     case "`uname -s`" in
  1141.     *win32* | *WIN32*)
  1142.       # Extract the first word of "cl", so it can be a program name with args.
  1143. set dummy cl; ac_word=$2
  1144. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1145. echo "configure:1146: checking for $ac_word" >&5
  1146. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1147.   echo $ac_n "(cached) $ac_c" 1>&6
  1148. else
  1149.   if test -n "$CC"; then
  1150.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1151. else
  1152.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1153.   ac_dummy="$PATH"
  1154.   for ac_dir in $ac_dummy; do
  1155.     test -z "$ac_dir" && ac_dir=.
  1156.     if test -f $ac_dir/$ac_word; then
  1157.       ac_cv_prog_CC="cl"
  1158.       break
  1159.     fi
  1160.   done
  1161.   IFS="$ac_save_ifs"
  1162. fi
  1163. fi
  1164. CC="$ac_cv_prog_CC"
  1165. if test -n "$CC"; then
  1166.   echo "$ac_t""$CC" 1>&6
  1167. else
  1168.   echo "$ac_t""no" 1>&6
  1169. fi
  1170.  ;;
  1171.     esac
  1172.   fi
  1173.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  1174. fi
  1175.  
  1176. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1177. echo "configure:1178: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  1178.  
  1179. ac_ext=c
  1180. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1181. ac_cpp='$CPP $CPPFLAGS'
  1182. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1183. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1184. cross_compiling=$ac_cv_prog_cc_cross
  1185.  
  1186. cat > conftest.$ac_ext << EOF
  1187.  
  1188. #line 1189 "configure"
  1189. #include "confdefs.h"
  1190.  
  1191. main(){return(0);}
  1192. EOF
  1193. if { (eval echo configure:1194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1194.   ac_cv_prog_cc_works=yes
  1195.   # If we can't run a trivial program, we are probably using a cross compiler.
  1196.   if (./conftest; exit) 2>/dev/null; then
  1197.     ac_cv_prog_cc_cross=no
  1198.   else
  1199.     ac_cv_prog_cc_cross=yes
  1200.   fi
  1201. else
  1202.   echo "configure: failed program was:" >&5
  1203.   cat conftest.$ac_ext >&5
  1204.   ac_cv_prog_cc_works=no
  1205. fi
  1206. rm -fr conftest*
  1207. ac_ext=c
  1208. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1209. ac_cpp='$CPP $CPPFLAGS'
  1210. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1211. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1212. cross_compiling=$ac_cv_prog_cc_cross
  1213.  
  1214. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  1215. if test $ac_cv_prog_cc_works = no; then
  1216.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  1217. fi
  1218. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  1219. echo "configure:1220: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  1220. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  1221. cross_compiling=$ac_cv_prog_cc_cross
  1222.  
  1223. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  1224. echo "configure:1225: checking whether we are using GNU C" >&5
  1225. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  1226.   echo $ac_n "(cached) $ac_c" 1>&6
  1227. else
  1228.   cat > conftest.c <<EOF
  1229. #ifdef __GNUC__
  1230.   yes;
  1231. #endif
  1232. EOF
  1233. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1234.   ac_cv_prog_gcc=yes
  1235. else
  1236.   ac_cv_prog_gcc=no
  1237. fi
  1238. fi
  1239.  
  1240. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  1241.  
  1242. if test $ac_cv_prog_gcc = yes; then
  1243.   GCC=yes
  1244. else
  1245.   GCC=
  1246. fi
  1247.  
  1248. ac_test_CFLAGS="${CFLAGS+set}"
  1249. ac_save_CFLAGS="$CFLAGS"
  1250. CFLAGS=
  1251. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  1252. echo "configure:1253: checking whether ${CC-cc} accepts -g" >&5
  1253. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  1254.   echo $ac_n "(cached) $ac_c" 1>&6
  1255. else
  1256.   echo 'void f(){}' > conftest.c
  1257. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  1258.   ac_cv_prog_cc_g=yes
  1259. else
  1260.   ac_cv_prog_cc_g=no
  1261. fi
  1262. rm -f conftest*
  1263.  
  1264. fi
  1265.  
  1266. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  1267. if test "$ac_test_CFLAGS" = set; then
  1268.   CFLAGS="$ac_save_CFLAGS"
  1269. elif test $ac_cv_prog_cc_g = yes; then
  1270.   if test "$GCC" = yes; then
  1271.     CFLAGS="-g -O2"
  1272.   else
  1273.     CFLAGS="-g"
  1274.   fi
  1275. else
  1276.   if test "$GCC" = yes; then
  1277.     CFLAGS="-O2"
  1278.   else
  1279.     CFLAGS=
  1280.   fi
  1281. fi
  1282.  
  1283.  
  1284.  
  1285.  
  1286. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  1287. echo "configure:1288: checking for ${CC-cc} option to accept ANSI C" >&5
  1288. if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
  1289.   echo $ac_n "(cached) $ac_c" 1>&6
  1290. else
  1291.   am_cv_prog_cc_stdc=no
  1292. ac_save_CC="$CC"
  1293. # Don't try gcc -ansi; that turns off useful extensions and
  1294. # breaks some systems' header files.
  1295. # AIX            -qlanglvl=ansi
  1296. # Ultrix and OSF/1    -std1
  1297. # HP-UX            -Aa -D_HPUX_SOURCE
  1298. # SVR4            -Xc -D__EXTENSIONS__
  1299. for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  1300. do
  1301.   CC="$ac_save_CC $ac_arg"
  1302.   cat > conftest.$ac_ext <<EOF
  1303. #line 1304 "configure"
  1304. #include "confdefs.h"
  1305. #include <stdarg.h>
  1306. #include <stdio.h>
  1307. #include <sys/types.h>
  1308. #include <sys/stat.h>
  1309. /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
  1310. struct buf { int x; };
  1311. FILE * (*rcsopen) (struct buf *, struct stat *, int);
  1312. static char *e (p, i)
  1313.      char **p;
  1314.      int i;
  1315. {
  1316.   return p[i];
  1317. }
  1318. static char *f (char * (*g) (char **, int), char **p, ...)
  1319. {
  1320.   char *s;
  1321.   va_list v;
  1322.   va_start (v,p);
  1323.   s = g (p, va_arg (v,int));
  1324.   va_end (v);
  1325.   return s;
  1326. }
  1327. int test (int i, double x);
  1328. struct s1 {int (*f) (int a);};
  1329. struct s2 {int (*f) (double a);};
  1330. int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
  1331. int argc;
  1332. char **argv;
  1333.  
  1334. int main() {
  1335.  
  1336. return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  1337.  
  1338. ; return 0; }
  1339. EOF
  1340. if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1341.   rm -rf conftest*
  1342.   am_cv_prog_cc_stdc="$ac_arg"; break
  1343. else
  1344.   echo "configure: failed program was:" >&5
  1345.   cat conftest.$ac_ext >&5
  1346. fi
  1347. rm -f conftest*
  1348. done
  1349. CC="$ac_save_CC"
  1350.  
  1351. fi
  1352.  
  1353. if test -z "$am_cv_prog_cc_stdc"; then
  1354.   echo "$ac_t""none needed" 1>&6
  1355. else
  1356.   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
  1357. fi
  1358. case "x$am_cv_prog_cc_stdc" in
  1359.   x|xno) ;;
  1360.   *) CC="$CC $am_cv_prog_cc_stdc" ;;
  1361. esac
  1362.  
  1363. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1364. echo "configure:1365: checking how to run the C preprocessor" >&5
  1365. # On Suns, sometimes $CPP names a directory.
  1366. if test -n "$CPP" && test -d "$CPP"; then
  1367.   CPP=
  1368. fi
  1369. if test -z "$CPP"; then
  1370. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1371.   echo $ac_n "(cached) $ac_c" 1>&6
  1372. else
  1373.     # This must be in double quotes, not single quotes, because CPP may get
  1374.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1375.   CPP="${CC-cc} -E"
  1376.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1377.   # not just through cpp.
  1378.   cat > conftest.$ac_ext <<EOF
  1379. #line 1380 "configure"
  1380. #include "confdefs.h"
  1381. #include <assert.h>
  1382. Syntax Error
  1383. EOF
  1384. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1385. { (eval echo configure:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1386. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1387. if test -z "$ac_err"; then
  1388.   :
  1389. else
  1390.   echo "$ac_err" >&5
  1391.   echo "configure: failed program was:" >&5
  1392.   cat conftest.$ac_ext >&5
  1393.   rm -rf conftest*
  1394.   CPP="${CC-cc} -E -traditional-cpp"
  1395.   cat > conftest.$ac_ext <<EOF
  1396. #line 1397 "configure"
  1397. #include "confdefs.h"
  1398. #include <assert.h>
  1399. Syntax Error
  1400. EOF
  1401. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1402. { (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1403. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1404. if test -z "$ac_err"; then
  1405.   :
  1406. else
  1407.   echo "$ac_err" >&5
  1408.   echo "configure: failed program was:" >&5
  1409.   cat conftest.$ac_ext >&5
  1410.   rm -rf conftest*
  1411.   CPP="${CC-cc} -nologo -E"
  1412.   cat > conftest.$ac_ext <<EOF
  1413. #line 1414 "configure"
  1414. #include "confdefs.h"
  1415. #include <assert.h>
  1416. Syntax Error
  1417. EOF
  1418. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1419. { (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1420. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1421. if test -z "$ac_err"; then
  1422.   :
  1423. else
  1424.   echo "$ac_err" >&5
  1425.   echo "configure: failed program was:" >&5
  1426.   cat conftest.$ac_ext >&5
  1427.   rm -rf conftest*
  1428.   CPP=/lib/cpp
  1429. fi
  1430. rm -f conftest*
  1431. fi
  1432. rm -f conftest*
  1433. fi
  1434. rm -f conftest*
  1435.   ac_cv_prog_CPP="$CPP"
  1436. fi
  1437.   CPP="$ac_cv_prog_CPP"
  1438. else
  1439.   ac_cv_prog_CPP="$CPP"
  1440. fi
  1441. echo "$ac_t""$CPP" 1>&6
  1442.  
  1443.  
  1444.  
  1445. echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
  1446. echo "configure:1447: checking for function prototypes" >&5
  1447. if test "$am_cv_prog_cc_stdc" != no; then
  1448.   echo "$ac_t""yes" 1>&6
  1449.   cat >> confdefs.h <<\EOF
  1450. #define PROTOTYPES 1
  1451. EOF
  1452.  
  1453.   U= ANSI2KNR=
  1454. else
  1455.   echo "$ac_t""no" 1>&6
  1456.   U=_ ANSI2KNR=./ansi2knr
  1457.   # Ensure some checks needed by ansi2knr itself.
  1458.   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1459. echo "configure:1460: checking for ANSI C header files" >&5
  1460. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1461.   echo $ac_n "(cached) $ac_c" 1>&6
  1462. else
  1463.   cat > conftest.$ac_ext <<EOF
  1464. #line 1465 "configure"
  1465. #include "confdefs.h"
  1466. #include <stdlib.h>
  1467. #include <stdarg.h>
  1468. #include <string.h>
  1469. #include <float.h>
  1470. EOF
  1471. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1472. { (eval echo configure:1473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1473. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1474. if test -z "$ac_err"; then
  1475.   rm -rf conftest*
  1476.   ac_cv_header_stdc=yes
  1477. else
  1478.   echo "$ac_err" >&5
  1479.   echo "configure: failed program was:" >&5
  1480.   cat conftest.$ac_ext >&5
  1481.   rm -rf conftest*
  1482.   ac_cv_header_stdc=no
  1483. fi
  1484. rm -f conftest*
  1485.  
  1486. if test $ac_cv_header_stdc = yes; then
  1487.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1488. cat > conftest.$ac_ext <<EOF
  1489. #line 1490 "configure"
  1490. #include "confdefs.h"
  1491. #include <string.h>
  1492. EOF
  1493. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1494.   egrep "memchr" >/dev/null 2>&1; then
  1495.   :
  1496. else
  1497.   rm -rf conftest*
  1498.   ac_cv_header_stdc=no
  1499. fi
  1500. rm -f conftest*
  1501.  
  1502. fi
  1503.  
  1504. if test $ac_cv_header_stdc = yes; then
  1505.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1506. cat > conftest.$ac_ext <<EOF
  1507. #line 1508 "configure"
  1508. #include "confdefs.h"
  1509. #include <stdlib.h>
  1510. EOF
  1511. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1512.   egrep "free" >/dev/null 2>&1; then
  1513.   :
  1514. else
  1515.   rm -rf conftest*
  1516.   ac_cv_header_stdc=no
  1517. fi
  1518. rm -f conftest*
  1519.  
  1520. fi
  1521.  
  1522. if test $ac_cv_header_stdc = yes; then
  1523.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1524. if test "$cross_compiling" = yes; then
  1525.   :
  1526. else
  1527.   cat > conftest.$ac_ext <<EOF
  1528. #line 1529 "configure"
  1529. #include "confdefs.h"
  1530. #include <ctype.h>
  1531. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1532. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1533. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1534. int main () { int i; for (i = 0; i < 256; i++)
  1535. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1536. exit (0); }
  1537.  
  1538. EOF
  1539. if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1540. then
  1541.   :
  1542. else
  1543.   echo "configure: failed program was:" >&5
  1544.   cat conftest.$ac_ext >&5
  1545.   rm -fr conftest*
  1546.   ac_cv_header_stdc=no
  1547. fi
  1548. rm -fr conftest*
  1549. fi
  1550.  
  1551. fi
  1552. fi
  1553.  
  1554. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1555. if test $ac_cv_header_stdc = yes; then
  1556.   cat >> confdefs.h <<\EOF
  1557. #define STDC_HEADERS 1
  1558. EOF
  1559.  
  1560. fi
  1561.  
  1562.   for ac_hdr in string.h
  1563. do
  1564. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1565. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1566. echo "configure:1567: checking for $ac_hdr" >&5
  1567. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1568.   echo $ac_n "(cached) $ac_c" 1>&6
  1569. else
  1570.   cat > conftest.$ac_ext <<EOF
  1571. #line 1572 "configure"
  1572. #include "confdefs.h"
  1573. #include <$ac_hdr>
  1574. EOF
  1575. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1576. { (eval echo configure:1577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1577. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1578. if test -z "$ac_err"; then
  1579.   rm -rf conftest*
  1580.   eval "ac_cv_header_$ac_safe=yes"
  1581. else
  1582.   echo "$ac_err" >&5
  1583.   echo "configure: failed program was:" >&5
  1584.   cat conftest.$ac_ext >&5
  1585.   rm -rf conftest*
  1586.   eval "ac_cv_header_$ac_safe=no"
  1587. fi
  1588. rm -f conftest*
  1589. fi
  1590. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1591.   echo "$ac_t""yes" 1>&6
  1592.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1593.   cat >> confdefs.h <<EOF
  1594. #define $ac_tr_hdr 1
  1595. EOF
  1596.  
  1597. else
  1598.   echo "$ac_t""no" 1>&6
  1599. fi
  1600. done
  1601.  
  1602. fi
  1603.  
  1604. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1605. echo "configure:1606: checking how to run the C preprocessor" >&5
  1606. # On Suns, sometimes $CPP names a directory.
  1607. if test -n "$CPP" && test -d "$CPP"; then
  1608.   CPP=
  1609. fi
  1610. if test -z "$CPP"; then
  1611. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1612.   echo $ac_n "(cached) $ac_c" 1>&6
  1613. else
  1614.     # This must be in double quotes, not single quotes, because CPP may get
  1615.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1616.   CPP="${CC-cc} -E"
  1617.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1618.   # not just through cpp.
  1619.   cat > conftest.$ac_ext <<EOF
  1620. #line 1621 "configure"
  1621. #include "confdefs.h"
  1622. #include <assert.h>
  1623. Syntax Error
  1624. EOF
  1625. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1626. { (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1627. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1628. if test -z "$ac_err"; then
  1629.   :
  1630. else
  1631.   echo "$ac_err" >&5
  1632.   echo "configure: failed program was:" >&5
  1633.   cat conftest.$ac_ext >&5
  1634.   rm -rf conftest*
  1635.   CPP="${CC-cc} -E -traditional-cpp"
  1636.   cat > conftest.$ac_ext <<EOF
  1637. #line 1638 "configure"
  1638. #include "confdefs.h"
  1639. #include <assert.h>
  1640. Syntax Error
  1641. EOF
  1642. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1643. { (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1644. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1645. if test -z "$ac_err"; then
  1646.   :
  1647. else
  1648.   echo "$ac_err" >&5
  1649.   echo "configure: failed program was:" >&5
  1650.   cat conftest.$ac_ext >&5
  1651.   rm -rf conftest*
  1652.   CPP="${CC-cc} -nologo -E"
  1653.   cat > conftest.$ac_ext <<EOF
  1654. #line 1655 "configure"
  1655. #include "confdefs.h"
  1656. #include <assert.h>
  1657. Syntax Error
  1658. EOF
  1659. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1660. { (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1661. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1662. if test -z "$ac_err"; then
  1663.   :
  1664. else
  1665.   echo "$ac_err" >&5
  1666.   echo "configure: failed program was:" >&5
  1667.   cat conftest.$ac_ext >&5
  1668.   rm -rf conftest*
  1669.   CPP=/lib/cpp
  1670. fi
  1671. rm -f conftest*
  1672. fi
  1673. rm -f conftest*
  1674. fi
  1675. rm -f conftest*
  1676.   ac_cv_prog_CPP="$CPP"
  1677. fi
  1678.   CPP="$ac_cv_prog_CPP"
  1679. else
  1680.   ac_cv_prog_CPP="$CPP"
  1681. fi
  1682. echo "$ac_t""$CPP" 1>&6
  1683.  
  1684. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1685. echo "configure:1686: checking for working const" >&5
  1686. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1687.   echo $ac_n "(cached) $ac_c" 1>&6
  1688. else
  1689.   cat > conftest.$ac_ext <<EOF
  1690. #line 1691 "configure"
  1691. #include "confdefs.h"
  1692.  
  1693. int main() {
  1694.  
  1695. /* Ultrix mips cc rejects this.  */
  1696. typedef int charset[2]; const charset x;
  1697. /* SunOS 4.1.1 cc rejects this.  */
  1698. char const *const *ccp;
  1699. char **p;
  1700. /* NEC SVR4.0.2 mips cc rejects this.  */
  1701. struct point {int x, y;};
  1702. static struct point const zero = {0,0};
  1703. /* AIX XL C 1.02.0.0 rejects this.
  1704.    It does not let you subtract one const X* pointer from another in an arm
  1705.    of an if-expression whose if-part is not a constant expression */
  1706. const char *g = "string";
  1707. ccp = &g + (g ? g-g : 0);
  1708. /* HPUX 7.0 cc rejects these. */
  1709. ++ccp;
  1710. p = (char**) ccp;
  1711. ccp = (char const *const *) p;
  1712. { /* SCO 3.2v4 cc rejects this.  */
  1713.   char *t;
  1714.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1715.  
  1716.   *t++ = 0;
  1717. }
  1718. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1719.   int x[] = {25, 17};
  1720.   const int *foo = &x[0];
  1721.   ++foo;
  1722. }
  1723. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1724.   typedef const int *iptr;
  1725.   iptr p = 0;
  1726.   ++p;
  1727. }
  1728. { /* AIX XL C 1.02.0.0 rejects this saying
  1729.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1730.   struct s { int j; const int *ap[3]; };
  1731.   struct s *b; b->j = 5;
  1732. }
  1733. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1734.   const int foo = 10;
  1735. }
  1736.  
  1737. ; return 0; }
  1738. EOF
  1739. if { (eval echo configure:1740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1740.   rm -rf conftest*
  1741.   ac_cv_c_const=yes
  1742. else
  1743.   echo "configure: failed program was:" >&5
  1744.   cat conftest.$ac_ext >&5
  1745.   rm -rf conftest*
  1746.   ac_cv_c_const=no
  1747. fi
  1748. rm -f conftest*
  1749. fi
  1750.  
  1751. echo "$ac_t""$ac_cv_c_const" 1>&6
  1752. if test $ac_cv_c_const = no; then
  1753.   cat >> confdefs.h <<\EOF
  1754. #define const 
  1755. EOF
  1756.  
  1757. fi
  1758.  
  1759. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1760. echo "configure:1761: checking for inline" >&5
  1761. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1762.   echo $ac_n "(cached) $ac_c" 1>&6
  1763. else
  1764.   ac_cv_c_inline=no
  1765. for ac_kw in inline __inline__ __inline; do
  1766.   cat > conftest.$ac_ext <<EOF
  1767. #line 1768 "configure"
  1768. #include "confdefs.h"
  1769.  
  1770. int main() {
  1771. } $ac_kw foo() {
  1772. ; return 0; }
  1773. EOF
  1774. if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1775.   rm -rf conftest*
  1776.   ac_cv_c_inline=$ac_kw; break
  1777. else
  1778.   echo "configure: failed program was:" >&5
  1779.   cat conftest.$ac_ext >&5
  1780. fi
  1781. rm -f conftest*
  1782. done
  1783.  
  1784. fi
  1785.  
  1786. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1787. case "$ac_cv_c_inline" in
  1788.   inline | yes) ;;
  1789.   no) cat >> confdefs.h <<\EOF
  1790. #define inline 
  1791. EOF
  1792.  ;;
  1793.   *)  cat >> confdefs.h <<EOF
  1794. #define inline $ac_cv_c_inline
  1795. EOF
  1796.  ;;
  1797. esac
  1798.  
  1799.  
  1800.  
  1801. echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
  1802. echo "configure:1803: checking for preprocessor stringizing operator" >&5
  1803. if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
  1804.   echo $ac_n "(cached) $ac_c" 1>&6
  1805. else
  1806.   cat > conftest.$ac_ext <<EOF
  1807. #line 1808 "configure"
  1808. #include "confdefs.h"
  1809.  
  1810. #define x(y) #y
  1811.  
  1812. char *s = x(teststring);
  1813.  
  1814. EOF
  1815. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1816.   egrep "#teststring" >/dev/null 2>&1; then
  1817.   rm -rf conftest*
  1818.   ac_cv_c_stringize=no
  1819. else
  1820.   rm -rf conftest*
  1821.   ac_cv_c_stringize=yes
  1822. fi
  1823. rm -f conftest*
  1824.  
  1825. fi
  1826.  
  1827. if test "${ac_cv_c_stringize}" = yes
  1828. then
  1829.         cat >> confdefs.h <<\EOF
  1830. #define HAVE_STRINGIZE 1
  1831. EOF
  1832.  
  1833. fi
  1834. echo "$ac_t""${ac_cv_c_stringize}" 1>&6
  1835.  
  1836.  
  1837. echo $ac_n "checking if compiler handles warn and error directives correctly""... $ac_c" 1>&6
  1838. echo "configure:1839: checking if compiler handles warn and error directives correctly" >&5
  1839. cat > conftest.$ac_ext <<EOF
  1840. #line 1841 "configure"
  1841. #include "confdefs.h"
  1842. #if 0
  1843. #error "error"
  1844. #warning "warning"
  1845. #endif
  1846. EOF
  1847. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1848. { (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1849. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1850. if test -z "$ac_err"; then
  1851.   rm -rf conftest*
  1852.   ERRORFIX=
  1853.   echo "$ac_t""yes" 1>&6
  1854. else
  1855.   echo "$ac_err" >&5
  1856.   echo "configure: failed program was:" >&5
  1857.   cat conftest.$ac_ext >&5
  1858.   rm -rf conftest*
  1859.     ERRORFIX=errorfix
  1860.   echo "$ac_t""no" 1>&6
  1861. fi
  1862. rm -f conftest*
  1863.  
  1864.  
  1865.  
  1866.  
  1867. # If we find X, set shell vars x_includes and x_libraries to the
  1868. # paths, otherwise set no_x=yes.
  1869. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1870. # --without-x overrides everything else, but does not touch the cache.
  1871. echo $ac_n "checking for X""... $ac_c" 1>&6
  1872. echo "configure:1873: checking for X" >&5
  1873.  
  1874. # Check whether --with-x or --without-x was given.
  1875. if test "${with_x+set}" = set; then
  1876.   withval="$with_x"
  1877.   :
  1878. fi
  1879.  
  1880. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1881. if test "x$with_x" = xno; then
  1882.   # The user explicitly disabled X.
  1883.   have_x=disabled
  1884. else
  1885.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1886.     # Both variables are already set.
  1887.     have_x=yes
  1888.   else
  1889. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1890.   echo $ac_n "(cached) $ac_c" 1>&6
  1891. else
  1892.   # One or both of the vars are not set, and there is no cached value.
  1893. ac_x_includes=NO ac_x_libraries=NO
  1894. rm -fr conftestdir
  1895. if mkdir conftestdir; then
  1896.   cd conftestdir
  1897.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1898.   cat > Imakefile <<'EOF'
  1899. acfindx:
  1900.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1901. EOF
  1902.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1903.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1904.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1905.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1906.     for ac_extension in a so sl; do
  1907.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1908.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1909.         ac_im_usrlibdir=$ac_im_libdir; break
  1910.       fi
  1911.     done
  1912.     # Screen out bogus values from the imake configuration.  They are
  1913.     # bogus both because they are the default anyway, and because
  1914.     # using them would break gcc on systems where it needs fixed includes.
  1915.     case "$ac_im_incroot" in
  1916.     /usr/include) ;;
  1917.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1918.     esac
  1919.     case "$ac_im_usrlibdir" in
  1920.     /usr/lib | /lib) ;;
  1921.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1922.     esac
  1923.   fi
  1924.   cd ..
  1925.   rm -fr conftestdir
  1926. fi
  1927.  
  1928. if test "$ac_x_includes" = NO; then
  1929.   # Guess where to find include files, by looking for this one X11 .h file.
  1930.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1931.  
  1932.   # First, try using that file with no special directory specified.
  1933. cat > conftest.$ac_ext <<EOF
  1934. #line 1935 "configure"
  1935. #include "confdefs.h"
  1936. #include <$x_direct_test_include>
  1937. EOF
  1938. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1939. { (eval echo configure:1940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1940. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1941. if test -z "$ac_err"; then
  1942.   rm -rf conftest*
  1943.   # We can compile using X headers with no special include directory.
  1944. ac_x_includes=
  1945. else
  1946.   echo "$ac_err" >&5
  1947.   echo "configure: failed program was:" >&5
  1948.   cat conftest.$ac_ext >&5
  1949.   rm -rf conftest*
  1950.   # Look for the header file in a standard set of common directories.
  1951. # Check X11 before X11Rn because it is often a symlink to the current release.
  1952.   for ac_dir in               \
  1953.     /usr/X11/include          \
  1954.     /usr/X11R6/include        \
  1955.     /usr/X11R5/include        \
  1956.     /usr/X11R4/include        \
  1957.                               \
  1958.     /usr/include/X11          \
  1959.     /usr/include/X11R6        \
  1960.     /usr/include/X11R5        \
  1961.     /usr/include/X11R4        \
  1962.                               \
  1963.     /usr/local/X11/include    \
  1964.     /usr/local/X11R6/include  \
  1965.     /usr/local/X11R5/include  \
  1966.     /usr/local/X11R4/include  \
  1967.                               \
  1968.     /usr/local/include/X11    \
  1969.     /usr/local/include/X11R6  \
  1970.     /usr/local/include/X11R5  \
  1971.     /usr/local/include/X11R4  \
  1972.                               \
  1973.     /usr/X386/include         \
  1974.     /usr/x386/include         \
  1975.     /usr/XFree86/include/X11  \
  1976.                               \
  1977.     /usr/include              \
  1978.     /usr/local/include        \
  1979.     /usr/unsupported/include  \
  1980.     /usr/athena/include       \
  1981.     /usr/local/x11r5/include  \
  1982.     /usr/lpp/Xamples/include  \
  1983.                               \
  1984.     /usr/openwin/include      \
  1985.     /usr/openwin/share/include \
  1986.     ; \
  1987.   do
  1988.     if test -r "$ac_dir/$x_direct_test_include"; then
  1989.       ac_x_includes=$ac_dir
  1990.       break
  1991.     fi
  1992.   done
  1993. fi
  1994. rm -f conftest*
  1995. fi # $ac_x_includes = NO
  1996.  
  1997. if test "$ac_x_libraries" = NO; then
  1998.   # Check for the libraries.
  1999.  
  2000.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  2001.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  2002.  
  2003.   # See if we find them without any special options.
  2004.   # Don't add to $LIBS permanently.
  2005.   ac_save_LIBS="$LIBS"
  2006.   LIBS="-l$x_direct_test_library $LIBS"
  2007. cat > conftest.$ac_ext <<EOF
  2008. #line 2009 "configure"
  2009. #include "confdefs.h"
  2010.  
  2011. int main() {
  2012. ${x_direct_test_function}()
  2013. ; return 0; }
  2014. EOF
  2015. if { (eval echo configure:2016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2016.   rm -rf conftest*
  2017.   LIBS="$ac_save_LIBS"
  2018. # We can link X programs with no special library path.
  2019. ac_x_libraries=
  2020. else
  2021.   echo "configure: failed program was:" >&5
  2022.   cat conftest.$ac_ext >&5
  2023.   rm -rf conftest*
  2024.   LIBS="$ac_save_LIBS"
  2025. # First see if replacing the include by lib works.
  2026. # Check X11 before X11Rn because it is often a symlink to the current release.
  2027. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  2028.     /usr/X11/lib          \
  2029.     /usr/X11R6/lib        \
  2030.     /usr/X11R5/lib        \
  2031.     /usr/X11R4/lib        \
  2032.                           \
  2033.     /usr/lib/X11          \
  2034.     /usr/lib/X11R6        \
  2035.     /usr/lib/X11R5        \
  2036.     /usr/lib/X11R4        \
  2037.                           \
  2038.     /usr/local/X11/lib    \
  2039.     /usr/local/X11R6/lib  \
  2040.     /usr/local/X11R5/lib  \
  2041.     /usr/local/X11R4/lib  \
  2042.                           \
  2043.     /usr/local/lib/X11    \
  2044.     /usr/local/lib/X11R6  \
  2045.     /usr/local/lib/X11R5  \
  2046.     /usr/local/lib/X11R4  \
  2047.                           \
  2048.     /usr/X386/lib         \
  2049.     /usr/x386/lib         \
  2050.     /usr/XFree86/lib/X11  \
  2051.                           \
  2052.     /usr/lib              \
  2053.     /usr/local/lib        \
  2054.     /usr/unsupported/lib  \
  2055.     /usr/athena/lib       \
  2056.     /usr/local/x11r5/lib  \
  2057.     /usr/lpp/Xamples/lib  \
  2058.     /lib/usr/lib/X11      \
  2059.                           \
  2060.     /usr/openwin/lib      \
  2061.     /usr/openwin/share/lib \
  2062.     ; \
  2063. do
  2064.   for ac_extension in a so sl; do
  2065.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  2066.       ac_x_libraries=$ac_dir
  2067.       break 2
  2068.     fi
  2069.   done
  2070. done
  2071. fi
  2072. rm -f conftest*
  2073. fi # $ac_x_libraries = NO
  2074.  
  2075. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  2076.   # Didn't find X anywhere.  Cache the known absence of X.
  2077.   ac_cv_have_x="have_x=no"
  2078. else
  2079.   # Record where we found X for the cache.
  2080.   ac_cv_have_x="have_x=yes \
  2081.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  2082. fi
  2083. fi
  2084.   fi
  2085.   eval "$ac_cv_have_x"
  2086. fi # $with_x != no
  2087.  
  2088. if test "$have_x" != yes; then
  2089.   echo "$ac_t""$have_x" 1>&6
  2090.   no_x=yes
  2091. else
  2092.   # If each of the values was on the command line, it overrides each guess.
  2093.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  2094.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  2095.   # Update the cache value to reflect the command line values.
  2096.   ac_cv_have_x="have_x=yes \
  2097.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  2098.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  2099. fi
  2100.  
  2101. if test "$no_x" = yes; then
  2102.   # Not all programs may use this symbol, but it does not hurt to define it.
  2103.   cat >> confdefs.h <<\EOF
  2104. #define X_DISPLAY_MISSING 1
  2105. EOF
  2106.  
  2107.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  2108. else
  2109.   if test -n "$x_includes"; then
  2110.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  2111.   fi
  2112.  
  2113.   # It would also be nice to do this for all -L options, not just this one.
  2114.   if test -n "$x_libraries"; then
  2115.     X_LIBS="$X_LIBS -L$x_libraries"
  2116.     # For Solaris; some versions of Sun CC require a space after -R and
  2117.     # others require no space.  Words are not sufficient . . . .
  2118.     case "`(uname -sr) 2>/dev/null`" in
  2119.     "SunOS 5"*)
  2120.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  2121. echo "configure:2122: checking whether -R must be followed by a space" >&5
  2122.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  2123.       cat > conftest.$ac_ext <<EOF
  2124. #line 2125 "configure"
  2125. #include "confdefs.h"
  2126.  
  2127. int main() {
  2128.  
  2129. ; return 0; }
  2130. EOF
  2131. if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2132.   rm -rf conftest*
  2133.   ac_R_nospace=yes
  2134. else
  2135.   echo "configure: failed program was:" >&5
  2136.   cat conftest.$ac_ext >&5
  2137.   rm -rf conftest*
  2138.   ac_R_nospace=no
  2139. fi
  2140. rm -f conftest*
  2141.       if test $ac_R_nospace = yes; then
  2142.     echo "$ac_t""no" 1>&6
  2143.     X_LIBS="$X_LIBS -R$x_libraries"
  2144.       else
  2145.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  2146.     cat > conftest.$ac_ext <<EOF
  2147. #line 2148 "configure"
  2148. #include "confdefs.h"
  2149.  
  2150. int main() {
  2151.  
  2152. ; return 0; }
  2153. EOF
  2154. if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2155.   rm -rf conftest*
  2156.   ac_R_space=yes
  2157. else
  2158.   echo "configure: failed program was:" >&5
  2159.   cat conftest.$ac_ext >&5
  2160.   rm -rf conftest*
  2161.   ac_R_space=no
  2162. fi
  2163. rm -f conftest*
  2164.     if test $ac_R_space = yes; then
  2165.       echo "$ac_t""yes" 1>&6
  2166.       X_LIBS="$X_LIBS -R $x_libraries"
  2167.     else
  2168.       echo "$ac_t""neither works" 1>&6
  2169.     fi
  2170.       fi
  2171.       LIBS="$ac_xsave_LIBS"
  2172.     esac
  2173.   fi
  2174.  
  2175.   # Check for system-dependent libraries X programs must link with.
  2176.   # Do this before checking for the system-independent R6 libraries
  2177.   # (-lICE), since we may need -lsocket or whatever for X linking.
  2178.  
  2179.   if test "$ISC" = yes; then
  2180.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  2181.   else
  2182.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  2183.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  2184.     # the Alpha needs dnet_stub (dnet does not exist).
  2185.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  2186. echo "configure:2187: checking for dnet_ntoa in -ldnet" >&5
  2187. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2188. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2189.   echo $ac_n "(cached) $ac_c" 1>&6
  2190. else
  2191.   ac_save_LIBS="$LIBS"
  2192. LIBS="-ldnet  $LIBS"
  2193. cat > conftest.$ac_ext <<EOF
  2194. #line 2195 "configure"
  2195. #include "confdefs.h"
  2196. /* Override any gcc2 internal prototype to avoid an error.  */
  2197. /* We use char because int might match the return type of a gcc2
  2198.     builtin and then its argument prototype would still apply.  */
  2199. char dnet_ntoa();
  2200.  
  2201. int main() {
  2202. dnet_ntoa()
  2203. ; return 0; }
  2204. EOF
  2205. if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2206.   rm -rf conftest*
  2207.   eval "ac_cv_lib_$ac_lib_var=yes"
  2208. else
  2209.   echo "configure: failed program was:" >&5
  2210.   cat conftest.$ac_ext >&5
  2211.   rm -rf conftest*
  2212.   eval "ac_cv_lib_$ac_lib_var=no"
  2213. fi
  2214. rm -f conftest*
  2215. LIBS="$ac_save_LIBS"
  2216.  
  2217. fi
  2218. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2219.   echo "$ac_t""yes" 1>&6
  2220.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  2221. else
  2222.   echo "$ac_t""no" 1>&6
  2223. fi
  2224.  
  2225.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  2226.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  2227. echo "configure:2228: checking for dnet_ntoa in -ldnet_stub" >&5
  2228. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2229. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2230.   echo $ac_n "(cached) $ac_c" 1>&6
  2231. else
  2232.   ac_save_LIBS="$LIBS"
  2233. LIBS="-ldnet_stub  $LIBS"
  2234. cat > conftest.$ac_ext <<EOF
  2235. #line 2236 "configure"
  2236. #include "confdefs.h"
  2237. /* Override any gcc2 internal prototype to avoid an error.  */
  2238. /* We use char because int might match the return type of a gcc2
  2239.     builtin and then its argument prototype would still apply.  */
  2240. char dnet_ntoa();
  2241.  
  2242. int main() {
  2243. dnet_ntoa()
  2244. ; return 0; }
  2245. EOF
  2246. if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2247.   rm -rf conftest*
  2248.   eval "ac_cv_lib_$ac_lib_var=yes"
  2249. else
  2250.   echo "configure: failed program was:" >&5
  2251.   cat conftest.$ac_ext >&5
  2252.   rm -rf conftest*
  2253.   eval "ac_cv_lib_$ac_lib_var=no"
  2254. fi
  2255. rm -f conftest*
  2256. LIBS="$ac_save_LIBS"
  2257.  
  2258. fi
  2259. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2260.   echo "$ac_t""yes" 1>&6
  2261.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  2262. else
  2263.   echo "$ac_t""no" 1>&6
  2264. fi
  2265.  
  2266.     fi
  2267.  
  2268.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  2269.     # to get the SysV transport functions.
  2270.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  2271.     # needs -lnsl.
  2272.     # The nsl library prevents programs from opening the X display
  2273.     # on Irix 5.2, according to dickey@clark.net.
  2274.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  2275. echo "configure:2276: checking for gethostbyname" >&5
  2276. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  2277.   echo $ac_n "(cached) $ac_c" 1>&6
  2278. else
  2279.   cat > conftest.$ac_ext <<EOF
  2280. #line 2281 "configure"
  2281. #include "confdefs.h"
  2282. /* System header to define __stub macros and hopefully few prototypes,
  2283.     which can conflict with char gethostbyname(); below.  */
  2284. #include <assert.h>
  2285. /* Override any gcc2 internal prototype to avoid an error.  */
  2286. /* We use char because int might match the return type of a gcc2
  2287.     builtin and then its argument prototype would still apply.  */
  2288. char gethostbyname();
  2289.  
  2290. int main() {
  2291.  
  2292. /* The GNU C library defines this for functions which it implements
  2293.     to always fail with ENOSYS.  Some functions are actually named
  2294.     something starting with __ and the normal name is an alias.  */
  2295. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  2296. choke me
  2297. #else
  2298. gethostbyname();
  2299. #endif
  2300.  
  2301. ; return 0; }
  2302. EOF
  2303. if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2304.   rm -rf conftest*
  2305.   eval "ac_cv_func_gethostbyname=yes"
  2306. else
  2307.   echo "configure: failed program was:" >&5
  2308.   cat conftest.$ac_ext >&5
  2309.   rm -rf conftest*
  2310.   eval "ac_cv_func_gethostbyname=no"
  2311. fi
  2312. rm -f conftest*
  2313. fi
  2314.  
  2315. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  2316.   echo "$ac_t""yes" 1>&6
  2317.   :
  2318. else
  2319.   echo "$ac_t""no" 1>&6
  2320. fi
  2321.  
  2322.     if test $ac_cv_func_gethostbyname = no; then
  2323.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  2324. echo "configure:2325: checking for gethostbyname in -lnsl" >&5
  2325. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  2326. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2327.   echo $ac_n "(cached) $ac_c" 1>&6
  2328. else
  2329.   ac_save_LIBS="$LIBS"
  2330. LIBS="-lnsl  $LIBS"
  2331. cat > conftest.$ac_ext <<EOF
  2332. #line 2333 "configure"
  2333. #include "confdefs.h"
  2334. /* Override any gcc2 internal prototype to avoid an error.  */
  2335. /* We use char because int might match the return type of a gcc2
  2336.     builtin and then its argument prototype would still apply.  */
  2337. char gethostbyname();
  2338.  
  2339. int main() {
  2340. gethostbyname()
  2341. ; return 0; }
  2342. EOF
  2343. if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2344.   rm -rf conftest*
  2345.   eval "ac_cv_lib_$ac_lib_var=yes"
  2346. else
  2347.   echo "configure: failed program was:" >&5
  2348.   cat conftest.$ac_ext >&5
  2349.   rm -rf conftest*
  2350.   eval "ac_cv_lib_$ac_lib_var=no"
  2351. fi
  2352. rm -f conftest*
  2353. LIBS="$ac_save_LIBS"
  2354.  
  2355. fi
  2356. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2357.   echo "$ac_t""yes" 1>&6
  2358.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  2359. else
  2360.   echo "$ac_t""no" 1>&6
  2361. fi
  2362.  
  2363.     fi
  2364.  
  2365.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  2366.     # socket/setsockopt and other routines are undefined under SCO ODT
  2367.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  2368.     # on later versions), says simon@lia.di.epfl.ch: it contains
  2369.     # gethostby* variants that don't use the nameserver (or something).
  2370.     # -lsocket must be given before -lnsl if both are needed.
  2371.     # We assume that if connect needs -lnsl, so does gethostbyname.
  2372.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  2373. echo "configure:2374: checking for connect" >&5
  2374. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  2375.   echo $ac_n "(cached) $ac_c" 1>&6
  2376. else
  2377.   cat > conftest.$ac_ext <<EOF
  2378. #line 2379 "configure"
  2379. #include "confdefs.h"
  2380. /* System header to define __stub macros and hopefully few prototypes,
  2381.     which can conflict with char connect(); below.  */
  2382. #include <assert.h>
  2383. /* Override any gcc2 internal prototype to avoid an error.  */
  2384. /* We use char because int might match the return type of a gcc2
  2385.     builtin and then its argument prototype would still apply.  */
  2386. char connect();
  2387.  
  2388. int main() {
  2389.  
  2390. /* The GNU C library defines this for functions which it implements
  2391.     to always fail with ENOSYS.  Some functions are actually named
  2392.     something starting with __ and the normal name is an alias.  */
  2393. #if defined (__stub_connect) || defined (__stub___connect)
  2394. choke me
  2395. #else
  2396. connect();
  2397. #endif
  2398.  
  2399. ; return 0; }
  2400. EOF
  2401. if { (eval echo configure:2402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2402.   rm -rf conftest*
  2403.   eval "ac_cv_func_connect=yes"
  2404. else
  2405.   echo "configure: failed program was:" >&5
  2406.   cat conftest.$ac_ext >&5
  2407.   rm -rf conftest*
  2408.   eval "ac_cv_func_connect=no"
  2409. fi
  2410. rm -f conftest*
  2411. fi
  2412.  
  2413. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  2414.   echo "$ac_t""yes" 1>&6
  2415.   :
  2416. else
  2417.   echo "$ac_t""no" 1>&6
  2418. fi
  2419.  
  2420.     if test $ac_cv_func_connect = no; then
  2421.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  2422. echo "configure:2423: checking for connect in -lsocket" >&5
  2423. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  2424. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2425.   echo $ac_n "(cached) $ac_c" 1>&6
  2426. else
  2427.   ac_save_LIBS="$LIBS"
  2428. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  2429. cat > conftest.$ac_ext <<EOF
  2430. #line 2431 "configure"
  2431. #include "confdefs.h"
  2432. /* Override any gcc2 internal prototype to avoid an error.  */
  2433. /* We use char because int might match the return type of a gcc2
  2434.     builtin and then its argument prototype would still apply.  */
  2435. char connect();
  2436.  
  2437. int main() {
  2438. connect()
  2439. ; return 0; }
  2440. EOF
  2441. if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2442.   rm -rf conftest*
  2443.   eval "ac_cv_lib_$ac_lib_var=yes"
  2444. else
  2445.   echo "configure: failed program was:" >&5
  2446.   cat conftest.$ac_ext >&5
  2447.   rm -rf conftest*
  2448.   eval "ac_cv_lib_$ac_lib_var=no"
  2449. fi
  2450. rm -f conftest*
  2451. LIBS="$ac_save_LIBS"
  2452.  
  2453. fi
  2454. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2455.   echo "$ac_t""yes" 1>&6
  2456.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  2457. else
  2458.   echo "$ac_t""no" 1>&6
  2459. fi
  2460.  
  2461.     fi
  2462.  
  2463.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  2464.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  2465. echo "configure:2466: checking for remove" >&5
  2466. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  2467.   echo $ac_n "(cached) $ac_c" 1>&6
  2468. else
  2469.   cat > conftest.$ac_ext <<EOF
  2470. #line 2471 "configure"
  2471. #include "confdefs.h"
  2472. /* System header to define __stub macros and hopefully few prototypes,
  2473.     which can conflict with char remove(); below.  */
  2474. #include <assert.h>
  2475. /* Override any gcc2 internal prototype to avoid an error.  */
  2476. /* We use char because int might match the return type of a gcc2
  2477.     builtin and then its argument prototype would still apply.  */
  2478. char remove();
  2479.  
  2480. int main() {
  2481.  
  2482. /* The GNU C library defines this for functions which it implements
  2483.     to always fail with ENOSYS.  Some functions are actually named
  2484.     something starting with __ and the normal name is an alias.  */
  2485. #if defined (__stub_remove) || defined (__stub___remove)
  2486. choke me
  2487. #else
  2488. remove();
  2489. #endif
  2490.  
  2491. ; return 0; }
  2492. EOF
  2493. if { (eval echo configure:2494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2494.   rm -rf conftest*
  2495.   eval "ac_cv_func_remove=yes"
  2496. else
  2497.   echo "configure: failed program was:" >&5
  2498.   cat conftest.$ac_ext >&5
  2499.   rm -rf conftest*
  2500.   eval "ac_cv_func_remove=no"
  2501. fi
  2502. rm -f conftest*
  2503. fi
  2504.  
  2505. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  2506.   echo "$ac_t""yes" 1>&6
  2507.   :
  2508. else
  2509.   echo "$ac_t""no" 1>&6
  2510. fi
  2511.  
  2512.     if test $ac_cv_func_remove = no; then
  2513.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  2514. echo "configure:2515: checking for remove in -lposix" >&5
  2515. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  2516. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2517.   echo $ac_n "(cached) $ac_c" 1>&6
  2518. else
  2519.   ac_save_LIBS="$LIBS"
  2520. LIBS="-lposix  $LIBS"
  2521. cat > conftest.$ac_ext <<EOF
  2522. #line 2523 "configure"
  2523. #include "confdefs.h"
  2524. /* Override any gcc2 internal prototype to avoid an error.  */
  2525. /* We use char because int might match the return type of a gcc2
  2526.     builtin and then its argument prototype would still apply.  */
  2527. char remove();
  2528.  
  2529. int main() {
  2530. remove()
  2531. ; return 0; }
  2532. EOF
  2533. if { (eval echo configure:2534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2534.   rm -rf conftest*
  2535.   eval "ac_cv_lib_$ac_lib_var=yes"
  2536. else
  2537.   echo "configure: failed program was:" >&5
  2538.   cat conftest.$ac_ext >&5
  2539.   rm -rf conftest*
  2540.   eval "ac_cv_lib_$ac_lib_var=no"
  2541. fi
  2542. rm -f conftest*
  2543. LIBS="$ac_save_LIBS"
  2544.  
  2545. fi
  2546. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2547.   echo "$ac_t""yes" 1>&6
  2548.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  2549. else
  2550.   echo "$ac_t""no" 1>&6
  2551. fi
  2552.  
  2553.     fi
  2554.  
  2555.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  2556.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  2557. echo "configure:2558: checking for shmat" >&5
  2558. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  2559.   echo $ac_n "(cached) $ac_c" 1>&6
  2560. else
  2561.   cat > conftest.$ac_ext <<EOF
  2562. #line 2563 "configure"
  2563. #include "confdefs.h"
  2564. /* System header to define __stub macros and hopefully few prototypes,
  2565.     which can conflict with char shmat(); below.  */
  2566. #include <assert.h>
  2567. /* Override any gcc2 internal prototype to avoid an error.  */
  2568. /* We use char because int might match the return type of a gcc2
  2569.     builtin and then its argument prototype would still apply.  */
  2570. char shmat();
  2571.  
  2572. int main() {
  2573.  
  2574. /* The GNU C library defines this for functions which it implements
  2575.     to always fail with ENOSYS.  Some functions are actually named
  2576.     something starting with __ and the normal name is an alias.  */
  2577. #if defined (__stub_shmat) || defined (__stub___shmat)
  2578. choke me
  2579. #else
  2580. shmat();
  2581. #endif
  2582.  
  2583. ; return 0; }
  2584. EOF
  2585. if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2586.   rm -rf conftest*
  2587.   eval "ac_cv_func_shmat=yes"
  2588. else
  2589.   echo "configure: failed program was:" >&5
  2590.   cat conftest.$ac_ext >&5
  2591.   rm -rf conftest*
  2592.   eval "ac_cv_func_shmat=no"
  2593. fi
  2594. rm -f conftest*
  2595. fi
  2596.  
  2597. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  2598.   echo "$ac_t""yes" 1>&6
  2599.   :
  2600. else
  2601.   echo "$ac_t""no" 1>&6
  2602. fi
  2603.  
  2604.     if test $ac_cv_func_shmat = no; then
  2605.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  2606. echo "configure:2607: checking for shmat in -lipc" >&5
  2607. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  2608. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2609.   echo $ac_n "(cached) $ac_c" 1>&6
  2610. else
  2611.   ac_save_LIBS="$LIBS"
  2612. LIBS="-lipc  $LIBS"
  2613. cat > conftest.$ac_ext <<EOF
  2614. #line 2615 "configure"
  2615. #include "confdefs.h"
  2616. /* Override any gcc2 internal prototype to avoid an error.  */
  2617. /* We use char because int might match the return type of a gcc2
  2618.     builtin and then its argument prototype would still apply.  */
  2619. char shmat();
  2620.  
  2621. int main() {
  2622. shmat()
  2623. ; return 0; }
  2624. EOF
  2625. if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2626.   rm -rf conftest*
  2627.   eval "ac_cv_lib_$ac_lib_var=yes"
  2628. else
  2629.   echo "configure: failed program was:" >&5
  2630.   cat conftest.$ac_ext >&5
  2631.   rm -rf conftest*
  2632.   eval "ac_cv_lib_$ac_lib_var=no"
  2633. fi
  2634. rm -f conftest*
  2635. LIBS="$ac_save_LIBS"
  2636.  
  2637. fi
  2638. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2639.   echo "$ac_t""yes" 1>&6
  2640.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  2641. else
  2642.   echo "$ac_t""no" 1>&6
  2643. fi
  2644.  
  2645.     fi
  2646.   fi
  2647.  
  2648.   # Check for libraries that X11R6 Xt/Xaw programs need.
  2649.   ac_save_LDFLAGS="$LDFLAGS"
  2650.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  2651.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  2652.   # check for ICE first), but we must link in the order -lSM -lICE or
  2653.   # we get undefined symbols.  So assume we have SM if we have ICE.
  2654.   # These have to be linked with before -lX11, unlike the other
  2655.   # libraries we check for below, so use a different variable.
  2656.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  2657.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  2658. echo "configure:2659: checking for IceConnectionNumber in -lICE" >&5
  2659. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  2660. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2661.   echo $ac_n "(cached) $ac_c" 1>&6
  2662. else
  2663.   ac_save_LIBS="$LIBS"
  2664. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  2665. cat > conftest.$ac_ext <<EOF
  2666. #line 2667 "configure"
  2667. #include "confdefs.h"
  2668. /* Override any gcc2 internal prototype to avoid an error.  */
  2669. /* We use char because int might match the return type of a gcc2
  2670.     builtin and then its argument prototype would still apply.  */
  2671. char IceConnectionNumber();
  2672.  
  2673. int main() {
  2674. IceConnectionNumber()
  2675. ; return 0; }
  2676. EOF
  2677. if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2678.   rm -rf conftest*
  2679.   eval "ac_cv_lib_$ac_lib_var=yes"
  2680. else
  2681.   echo "configure: failed program was:" >&5
  2682.   cat conftest.$ac_ext >&5
  2683.   rm -rf conftest*
  2684.   eval "ac_cv_lib_$ac_lib_var=no"
  2685. fi
  2686. rm -f conftest*
  2687. LIBS="$ac_save_LIBS"
  2688.  
  2689. fi
  2690. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2691.   echo "$ac_t""yes" 1>&6
  2692.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  2693. else
  2694.   echo "$ac_t""no" 1>&6
  2695. fi
  2696.  
  2697.   LDFLAGS="$ac_save_LDFLAGS"
  2698.  
  2699. fi
  2700.  
  2701. if test "$no_x" != yes; then
  2702.   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  2703.   X_LIBRARIES="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
  2704.   GNUPLOT_X11=gnuplot_x11
  2705.   cat >> confdefs.h <<\EOF
  2706. #define X11 1
  2707. EOF
  2708.  
  2709. fi
  2710.  
  2711.  
  2712. echo $ac_n "checking for MS-DOS/djgpp/libGRX""... $ac_c" 1>&6
  2713. echo "configure:2714: checking for MS-DOS/djgpp/libGRX" >&5
  2714. cat > conftest.$ac_ext <<EOF
  2715. #line 2716 "configure"
  2716. #include "confdefs.h"
  2717. #if __DJGPP__ && __DJGPP__ == 2
  2718.   yes
  2719. #endif
  2720.  
  2721. EOF
  2722. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2723.   egrep "yes" >/dev/null 2>&1; then
  2724.   rm -rf conftest*
  2725.   echo "$ac_t""yes" 1>&6
  2726.    LIBS="-lpc $LIBS"
  2727.    cat >> confdefs.h <<\EOF
  2728. #define MSDOS 1
  2729. EOF
  2730.  
  2731.    cat >> confdefs.h <<\EOF
  2732. #define DOS32 1
  2733. EOF
  2734.  
  2735.    with_linux_vga=no
  2736.    echo $ac_n "checking for GrLine in -lgrx20""... $ac_c" 1>&6
  2737. echo "configure:2738: checking for GrLine in -lgrx20" >&5
  2738. ac_lib_var=`echo grx20'_'GrLine | sed 'y%./+-%__p_%'`
  2739. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2740.   echo $ac_n "(cached) $ac_c" 1>&6
  2741. else
  2742.   ac_save_LIBS="$LIBS"
  2743. LIBS="-lgrx20  $LIBS"
  2744. cat > conftest.$ac_ext <<EOF
  2745. #line 2746 "configure"
  2746. #include "confdefs.h"
  2747. /* Override any gcc2 internal prototype to avoid an error.  */
  2748. /* We use char because int might match the return type of a gcc2
  2749.     builtin and then its argument prototype would still apply.  */
  2750. char GrLine();
  2751.  
  2752. int main() {
  2753. GrLine()
  2754. ; return 0; }
  2755. EOF
  2756. if { (eval echo configure:2757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2757.   rm -rf conftest*
  2758.   eval "ac_cv_lib_$ac_lib_var=yes"
  2759. else
  2760.   echo "configure: failed program was:" >&5
  2761.   cat conftest.$ac_ext >&5
  2762.   rm -rf conftest*
  2763.   eval "ac_cv_lib_$ac_lib_var=no"
  2764. fi
  2765. rm -f conftest*
  2766. LIBS="$ac_save_LIBS"
  2767.  
  2768. fi
  2769. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2770.   echo "$ac_t""yes" 1>&6
  2771.         LIBS="-lgrx20 $LIBS"
  2772.       CFLAGS="$CFLAGS -fno-inline-functions"
  2773.       cat >> confdefs.h <<\EOF
  2774. #define DJSVGA 1
  2775. EOF
  2776.  
  2777.       echo $ac_n "checking for GrCustomLine in -lgrx20""... $ac_c" 1>&6
  2778. echo "configure:2779: checking for GrCustomLine in -lgrx20" >&5
  2779. ac_lib_var=`echo grx20'_'GrCustomLine | sed 'y%./+-%__p_%'`
  2780. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2781.   echo $ac_n "(cached) $ac_c" 1>&6
  2782. else
  2783.   ac_save_LIBS="$LIBS"
  2784. LIBS="-lgrx20  $LIBS"
  2785. cat > conftest.$ac_ext <<EOF
  2786. #line 2787 "configure"
  2787. #include "confdefs.h"
  2788. /* Override any gcc2 internal prototype to avoid an error.  */
  2789. /* We use char because int might match the return type of a gcc2
  2790.     builtin and then its argument prototype would still apply.  */
  2791. char GrCustomLine();
  2792.  
  2793. int main() {
  2794. GrCustomLine()
  2795. ; return 0; }
  2796. EOF
  2797. if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2798.   rm -rf conftest*
  2799.   eval "ac_cv_lib_$ac_lib_var=yes"
  2800. else
  2801.   echo "configure: failed program was:" >&5
  2802.   cat conftest.$ac_ext >&5
  2803.   rm -rf conftest*
  2804.   eval "ac_cv_lib_$ac_lib_var=no"
  2805. fi
  2806. rm -f conftest*
  2807. LIBS="$ac_save_LIBS"
  2808.  
  2809. fi
  2810. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2811.   echo "$ac_t""yes" 1>&6
  2812.   cat >> confdefs.h <<\EOF
  2813. #define GRX21 1
  2814. EOF
  2815.  
  2816. else
  2817.   echo "$ac_t""no" 1>&6
  2818. fi
  2819.  
  2820. else
  2821.   echo "$ac_t""no" 1>&6
  2822. fi
  2823.  
  2824. else
  2825.   rm -rf conftest*
  2826.      echo "$ac_t""no" 1>&6
  2827.    
  2828. fi
  2829. rm -f conftest*
  2830.  
  2831. echo $ac_n "checking for NeXT""... $ac_c" 1>&6
  2832. echo "configure:2833: checking for NeXT" >&5
  2833. cat > conftest.$ac_ext <<EOF
  2834. #line 2835 "configure"
  2835. #include "confdefs.h"
  2836. #if __NeXT__
  2837.   yes
  2838. #endif
  2839.  
  2840. EOF
  2841. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2842.   egrep "yes" >/dev/null 2>&1; then
  2843.   rm -rf conftest*
  2844.   echo "$ac_t""yes" 1>&6
  2845.    LIBS="$LIBS -lsys_s -lNeXT_s"
  2846.    NEXTOBJS=epsviewe.o
  2847.    CFLAGS="$CFLAGS -ObjC"
  2848. else
  2849.   rm -rf conftest*
  2850.      NEXTOBJS=
  2851.    echo "$ac_t""no" 1>&6
  2852. fi
  2853. rm -f conftest*
  2854.  
  2855.  
  2856.  
  2857. LIBS="$LIBS -lm"
  2858.  
  2859.  
  2860. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2861. echo "configure:2862: checking for ANSI C header files" >&5
  2862. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  2863.   echo $ac_n "(cached) $ac_c" 1>&6
  2864. else
  2865.   cat > conftest.$ac_ext <<EOF
  2866. #line 2867 "configure"
  2867. #include "confdefs.h"
  2868. #include <stdlib.h>
  2869. #include <stdarg.h>
  2870. #include <string.h>
  2871. #include <float.h>
  2872. EOF
  2873. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2874. { (eval echo configure:2875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2875. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2876. if test -z "$ac_err"; then
  2877.   rm -rf conftest*
  2878.   ac_cv_header_stdc=yes
  2879. else
  2880.   echo "$ac_err" >&5
  2881.   echo "configure: failed program was:" >&5
  2882.   cat conftest.$ac_ext >&5
  2883.   rm -rf conftest*
  2884.   ac_cv_header_stdc=no
  2885. fi
  2886. rm -f conftest*
  2887.  
  2888. if test $ac_cv_header_stdc = yes; then
  2889.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2890. cat > conftest.$ac_ext <<EOF
  2891. #line 2892 "configure"
  2892. #include "confdefs.h"
  2893. #include <string.h>
  2894. EOF
  2895. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2896.   egrep "memchr" >/dev/null 2>&1; then
  2897.   :
  2898. else
  2899.   rm -rf conftest*
  2900.   ac_cv_header_stdc=no
  2901. fi
  2902. rm -f conftest*
  2903.  
  2904. fi
  2905.  
  2906. if test $ac_cv_header_stdc = yes; then
  2907.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2908. cat > conftest.$ac_ext <<EOF
  2909. #line 2910 "configure"
  2910. #include "confdefs.h"
  2911. #include <stdlib.h>
  2912. EOF
  2913. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2914.   egrep "free" >/dev/null 2>&1; then
  2915.   :
  2916. else
  2917.   rm -rf conftest*
  2918.   ac_cv_header_stdc=no
  2919. fi
  2920. rm -f conftest*
  2921.  
  2922. fi
  2923.  
  2924. if test $ac_cv_header_stdc = yes; then
  2925.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2926. if test "$cross_compiling" = yes; then
  2927.   :
  2928. else
  2929.   cat > conftest.$ac_ext <<EOF
  2930. #line 2931 "configure"
  2931. #include "confdefs.h"
  2932. #include <ctype.h>
  2933. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2934. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2935. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2936. int main () { int i; for (i = 0; i < 256; i++)
  2937. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2938. exit (0); }
  2939.  
  2940. EOF
  2941. if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2942. then
  2943.   :
  2944. else
  2945.   echo "configure: failed program was:" >&5
  2946.   cat conftest.$ac_ext >&5
  2947.   rm -fr conftest*
  2948.   ac_cv_header_stdc=no
  2949. fi
  2950. rm -fr conftest*
  2951. fi
  2952.  
  2953. fi
  2954. fi
  2955.  
  2956. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2957. if test $ac_cv_header_stdc = yes; then
  2958.   cat >> confdefs.h <<\EOF
  2959. #define STDC_HEADERS 1
  2960. EOF
  2961.  
  2962. fi
  2963.  
  2964.  
  2965. for ac_hdr in errno.h float.h limits.h locale.h math.h stdlib.h string.h \
  2966.   time.h sys/time.h sys/timeb.h sys/types.h
  2967. do
  2968. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2969. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2970. echo "configure:2971: checking for $ac_hdr" >&5
  2971. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2972.   echo $ac_n "(cached) $ac_c" 1>&6
  2973. else
  2974.   cat > conftest.$ac_ext <<EOF
  2975. #line 2976 "configure"
  2976. #include "confdefs.h"
  2977. #include <$ac_hdr>
  2978. EOF
  2979. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2980. { (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2981. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2982. if test -z "$ac_err"; then
  2983.   rm -rf conftest*
  2984.   eval "ac_cv_header_$ac_safe=yes"
  2985. else
  2986.   echo "$ac_err" >&5
  2987.   echo "configure: failed program was:" >&5
  2988.   cat conftest.$ac_ext >&5
  2989.   rm -rf conftest*
  2990.   eval "ac_cv_header_$ac_safe=no"
  2991. fi
  2992. rm -f conftest*
  2993. fi
  2994. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2995.   echo "$ac_t""yes" 1>&6
  2996.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2997.   cat >> confdefs.h <<EOF
  2998. #define $ac_tr_hdr 1
  2999. EOF
  3000.  
  3001. else
  3002.   echo "$ac_t""no" 1>&6
  3003. fi
  3004. done
  3005.  
  3006. for ac_hdr in sys/bsdtypes.h sys/select.h sys/socket.h sys/stat.h \
  3007.   sys/systeminfo.h sys/utsname.h libc.h malloc.h sgtty.h termios.h values.h
  3008. do
  3009. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3010. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3011. echo "configure:3012: checking for $ac_hdr" >&5
  3012. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3013.   echo $ac_n "(cached) $ac_c" 1>&6
  3014. else
  3015.   cat > conftest.$ac_ext <<EOF
  3016. #line 3017 "configure"
  3017. #include "confdefs.h"
  3018. #include <$ac_hdr>
  3019. EOF
  3020. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3021. { (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3022. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3023. if test -z "$ac_err"; then
  3024.   rm -rf conftest*
  3025.   eval "ac_cv_header_$ac_safe=yes"
  3026. else
  3027.   echo "$ac_err" >&5
  3028.   echo "configure: failed program was:" >&5
  3029.   cat conftest.$ac_ext >&5
  3030.   rm -rf conftest*
  3031.   eval "ac_cv_header_$ac_safe=no"
  3032. fi
  3033. rm -f conftest*
  3034. fi
  3035. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3036.   echo "$ac_t""yes" 1>&6
  3037.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3038.   cat >> confdefs.h <<EOF
  3039. #define $ac_tr_hdr 1
  3040. EOF
  3041.  
  3042. else
  3043.   echo "$ac_t""no" 1>&6
  3044. fi
  3045. done
  3046.  
  3047. test "$ac_cv_header_sys_stat_h" = yes && echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  3048. echo "configure:3049: checking whether stat file-mode macros are broken" >&5
  3049. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  3050.   echo $ac_n "(cached) $ac_c" 1>&6
  3051. else
  3052.   cat > conftest.$ac_ext <<EOF
  3053. #line 3054 "configure"
  3054. #include "confdefs.h"
  3055. #include <sys/types.h>
  3056. #include <sys/stat.h>
  3057.  
  3058. #if defined(S_ISBLK) && defined(S_IFDIR)
  3059. # if S_ISBLK (S_IFDIR)
  3060. You lose.
  3061. # endif
  3062. #endif
  3063.  
  3064. #if defined(S_ISBLK) && defined(S_IFCHR)
  3065. # if S_ISBLK (S_IFCHR)
  3066. You lose.
  3067. # endif
  3068. #endif
  3069.  
  3070. #if defined(S_ISLNK) && defined(S_IFREG)
  3071. # if S_ISLNK (S_IFREG)
  3072. You lose.
  3073. # endif
  3074. #endif
  3075.  
  3076. #if defined(S_ISSOCK) && defined(S_IFREG)
  3077. # if S_ISSOCK (S_IFREG)
  3078. You lose.
  3079. # endif
  3080. #endif
  3081.  
  3082. EOF
  3083. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3084.   egrep "You lose" >/dev/null 2>&1; then
  3085.   rm -rf conftest*
  3086.   ac_cv_header_stat_broken=yes
  3087. else
  3088.   rm -rf conftest*
  3089.   ac_cv_header_stat_broken=no
  3090. fi
  3091. rm -f conftest*
  3092.  
  3093. fi
  3094.  
  3095. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  3096. if test $ac_cv_header_stat_broken = yes; then
  3097.   cat >> confdefs.h <<\EOF
  3098. #define STAT_MACROS_BROKEN 1
  3099. EOF
  3100.  
  3101. fi
  3102.  
  3103.  
  3104. echo $ac_n "checking for unistd.h""... $ac_c" 1>&6
  3105. echo "configure:3106: checking for unistd.h" >&5
  3106. cat > conftest.$ac_ext <<EOF
  3107. #line 3108 "configure"
  3108. #include "confdefs.h"
  3109. #include <unistd.h>
  3110. EOF
  3111. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3112.   egrep "execv" >/dev/null 2>&1; then
  3113.   rm -rf conftest*
  3114.   cat >> confdefs.h <<\EOF
  3115. #define HAVE_UNISTD_H 1
  3116. EOF
  3117.  echo "$ac_t""yes" 1>&6
  3118. else
  3119.   rm -rf conftest*
  3120.   echo "$ac_t""no" 1>&6
  3121. fi
  3122. rm -f conftest*
  3123.  
  3124.  
  3125. echo $ac_n "checking if errno variable is declared""... $ac_c" 1>&6
  3126. echo "configure:3127: checking if errno variable is declared" >&5
  3127. cat > conftest.$ac_ext <<EOF
  3128. #line 3129 "configure"
  3129. #include "confdefs.h"
  3130. #include <stdio.h>
  3131. #ifdef HAVE_ERRNO_H
  3132. #include <errno.h>
  3133. #endif
  3134. int main() {
  3135. errno=0
  3136. ; return 0; }
  3137. EOF
  3138. if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3139.   rm -rf conftest*
  3140.   echo "$ac_t""yes" 1>&6
  3141. else
  3142.   echo "configure: failed program was:" >&5
  3143.   cat conftest.$ac_ext >&5
  3144.   rm -rf conftest*
  3145.   cat >> confdefs.h <<\EOF
  3146. #define EXTERN_ERRNO 1
  3147. EOF
  3148.  echo "$ac_t""no" 1>&6
  3149. fi
  3150. rm -f conftest*
  3151.  
  3152.  
  3153. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  3154. echo "configure:3155: checking for size_t" >&5
  3155. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  3156.   echo $ac_n "(cached) $ac_c" 1>&6
  3157. else
  3158.   cat > conftest.$ac_ext <<EOF
  3159. #line 3160 "configure"
  3160. #include "confdefs.h"
  3161. #include <sys/types.h>
  3162. #if STDC_HEADERS
  3163. #include <stdlib.h>
  3164. #include <stddef.h>
  3165. #endif
  3166. EOF
  3167. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3168.   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3169.   rm -rf conftest*
  3170.   ac_cv_type_size_t=yes
  3171. else
  3172.   rm -rf conftest*
  3173.   ac_cv_type_size_t=no
  3174. fi
  3175. rm -f conftest*
  3176.  
  3177. fi
  3178. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  3179. if test $ac_cv_type_size_t = no; then
  3180.   cat >> confdefs.h <<\EOF
  3181. #define size_t unsigned
  3182. EOF
  3183.  
  3184. fi
  3185.  
  3186. echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
  3187. echo "configure:3188: checking for time_t in time.h" >&5
  3188. cat > conftest.$ac_ext <<EOF
  3189. #line 3190 "configure"
  3190. #include "confdefs.h"
  3191. #include <time.h>
  3192. EOF
  3193. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3194.   egrep "time_t" >/dev/null 2>&1; then
  3195.   rm -rf conftest*
  3196.      ac_cv_type_time_t=yes; echo "$ac_t""yes" 1>&6 
  3197. else
  3198.   rm -rf conftest*
  3199.      echo "$ac_t""no" 1>&6 echo $ac_n "checking for time_t""... $ac_c" 1>&6
  3200. echo "configure:3201: checking for time_t" >&5
  3201. if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
  3202.   echo $ac_n "(cached) $ac_c" 1>&6
  3203. else
  3204.   cat > conftest.$ac_ext <<EOF
  3205. #line 3206 "configure"
  3206. #include "confdefs.h"
  3207. #include <sys/types.h>
  3208. #if STDC_HEADERS
  3209. #include <stdlib.h>
  3210. #include <stddef.h>
  3211. #endif
  3212. EOF
  3213. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3214.   egrep "(^|[^a-zA-Z_0-9])time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3215.   rm -rf conftest*
  3216.   ac_cv_type_time_t=yes
  3217. else
  3218.   rm -rf conftest*
  3219.   ac_cv_type_time_t=no
  3220. fi
  3221. rm -f conftest*
  3222.  
  3223. fi
  3224. echo "$ac_t""$ac_cv_type_time_t" 1>&6
  3225. if test $ac_cv_type_time_t = no; then
  3226.   cat >> confdefs.h <<\EOF
  3227. #define time_t long
  3228. EOF
  3229.  
  3230. fi
  3231.  
  3232. fi
  3233. rm -f conftest*
  3234.  
  3235. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  3236. echo "configure:3237: checking return type of signal handlers" >&5
  3237. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  3238.   echo $ac_n "(cached) $ac_c" 1>&6
  3239. else
  3240.   cat > conftest.$ac_ext <<EOF
  3241. #line 3242 "configure"
  3242. #include "confdefs.h"
  3243. #include <sys/types.h>
  3244. #include <signal.h>
  3245. #ifdef signal
  3246. #undef signal
  3247. #endif
  3248. #ifdef __cplusplus
  3249. extern "C" void (*signal (int, void (*)(int)))(int);
  3250. #else
  3251. void (*signal ()) ();
  3252. #endif
  3253.  
  3254. int main() {
  3255. int i;
  3256. ; return 0; }
  3257. EOF
  3258. if { (eval echo configure:3259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3259.   rm -rf conftest*
  3260.   ac_cv_type_signal=void
  3261. else
  3262.   echo "configure: failed program was:" >&5
  3263.   cat conftest.$ac_ext >&5
  3264.   rm -rf conftest*
  3265.   ac_cv_type_signal=int
  3266. fi
  3267. rm -f conftest*
  3268. fi
  3269.  
  3270. echo "$ac_t""$ac_cv_type_signal" 1>&6
  3271. cat >> confdefs.h <<EOF
  3272. #define RETSIGTYPE $ac_cv_type_signal
  3273. EOF
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279. for ac_func in atexit on_exit memcpy memmove memset bcopy bzero setvbuf \
  3280.   strerror strchr index strrchr rindex strstr
  3281. do
  3282. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3283. echo "configure:3284: checking for $ac_func" >&5
  3284. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3285.   echo $ac_n "(cached) $ac_c" 1>&6
  3286. else
  3287.   cat > conftest.$ac_ext <<EOF
  3288. #line 3289 "configure"
  3289. #include "confdefs.h"
  3290. /* System header to define __stub macros and hopefully few prototypes,
  3291.     which can conflict with char $ac_func(); below.  */
  3292. #include <assert.h>
  3293. /* Override any gcc2 internal prototype to avoid an error.  */
  3294. /* We use char because int might match the return type of a gcc2
  3295.     builtin and then its argument prototype would still apply.  */
  3296. char $ac_func();
  3297.  
  3298. int main() {
  3299.  
  3300. /* The GNU C library defines this for functions which it implements
  3301.     to always fail with ENOSYS.  Some functions are actually named
  3302.     something starting with __ and the normal name is an alias.  */
  3303. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3304. choke me
  3305. #else
  3306. $ac_func();
  3307. #endif
  3308.  
  3309. ; return 0; }
  3310. EOF
  3311. if { (eval echo configure:3312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3312.   rm -rf conftest*
  3313.   eval "ac_cv_func_$ac_func=yes"
  3314. else
  3315.   echo "configure: failed program was:" >&5
  3316.   cat conftest.$ac_ext >&5
  3317.   rm -rf conftest*
  3318.   eval "ac_cv_func_$ac_func=no"
  3319. fi
  3320. rm -f conftest*
  3321. fi
  3322.  
  3323. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3324.   echo "$ac_t""yes" 1>&6
  3325.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3326.   cat >> confdefs.h <<EOF
  3327. #define $ac_tr_func 1
  3328. EOF
  3329.  
  3330. else
  3331.   echo "$ac_t""no" 1>&6
  3332. fi
  3333. done
  3334.  
  3335.  
  3336. for ac_func in erf erfc gamma lgamma getcwd pclose popen sleep snprintf \
  3337.   strncasecmp strnicmp sysinfo tcgetattr
  3338. do
  3339. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3340. echo "configure:3341: checking for $ac_func" >&5
  3341. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3342.   echo $ac_n "(cached) $ac_c" 1>&6
  3343. else
  3344.   cat > conftest.$ac_ext <<EOF
  3345. #line 3346 "configure"
  3346. #include "confdefs.h"
  3347. /* System header to define __stub macros and hopefully few prototypes,
  3348.     which can conflict with char $ac_func(); below.  */
  3349. #include <assert.h>
  3350. /* Override any gcc2 internal prototype to avoid an error.  */
  3351. /* We use char because int might match the return type of a gcc2
  3352.     builtin and then its argument prototype would still apply.  */
  3353. char $ac_func();
  3354.  
  3355. int main() {
  3356.  
  3357. /* The GNU C library defines this for functions which it implements
  3358.     to always fail with ENOSYS.  Some functions are actually named
  3359.     something starting with __ and the normal name is an alias.  */
  3360. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3361. choke me
  3362. #else
  3363. $ac_func();
  3364. #endif
  3365.  
  3366. ; return 0; }
  3367. EOF
  3368. if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3369.   rm -rf conftest*
  3370.   eval "ac_cv_func_$ac_func=yes"
  3371. else
  3372.   echo "configure: failed program was:" >&5
  3373.   cat conftest.$ac_ext >&5
  3374.   rm -rf conftest*
  3375.   eval "ac_cv_func_$ac_func=no"
  3376. fi
  3377. rm -f conftest*
  3378. fi
  3379.  
  3380. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3381.   echo "$ac_t""yes" 1>&6
  3382.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3383.   cat >> confdefs.h <<EOF
  3384. #define $ac_tr_func 1
  3385. EOF
  3386.  
  3387. else
  3388.   echo "$ac_t""no" 1>&6
  3389. fi
  3390. done
  3391.  
  3392. if test "$ac_cv_func_pclose" = yes && test "$ac_cv_func_popen" = yes ; then
  3393.   cat >> confdefs.h <<\EOF
  3394. #define PIPES 1
  3395. EOF
  3396.  
  3397. fi
  3398.  
  3399. for ac_hdr in sys/types.h sys/time.h sys/select.h sys/socket.h
  3400. do
  3401. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3402. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3403. echo "configure:3404: checking for $ac_hdr" >&5
  3404. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3405.   echo $ac_n "(cached) $ac_c" 1>&6
  3406. else
  3407.   cat > conftest.$ac_ext <<EOF
  3408. #line 3409 "configure"
  3409. #include "confdefs.h"
  3410. #include <$ac_hdr>
  3411. EOF
  3412. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3413. { (eval echo configure:3414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3414. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3415. if test -z "$ac_err"; then
  3416.   rm -rf conftest*
  3417.   eval "ac_cv_header_$ac_safe=yes"
  3418. else
  3419.   echo "$ac_err" >&5
  3420.   echo "configure: failed program was:" >&5
  3421.   cat conftest.$ac_ext >&5
  3422.   rm -rf conftest*
  3423.   eval "ac_cv_header_$ac_safe=no"
  3424. fi
  3425. rm -f conftest*
  3426. fi
  3427. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3428.   echo "$ac_t""yes" 1>&6
  3429.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3430.   cat >> confdefs.h <<EOF
  3431. #define $ac_tr_hdr 1
  3432. EOF
  3433.  
  3434. else
  3435.   echo "$ac_t""no" 1>&6
  3436. fi
  3437. done
  3438.  
  3439.  echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
  3440. echo "configure:3441: checking types of arguments for select()" >&5
  3441.  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
  3442.   echo $ac_n "(cached) $ac_c" 1>&6
  3443. else
  3444.    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
  3445.   echo $ac_n "(cached) $ac_c" 1>&6
  3446. else
  3447.     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
  3448.   echo $ac_n "(cached) $ac_c" 1>&6
  3449. else
  3450.      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
  3451.      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
  3452.       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
  3453.        cat > conftest.$ac_ext <<EOF
  3454. #line 3455 "configure"
  3455. #include "confdefs.h"
  3456. #ifdef HAVE_SYS_TYPES_H
  3457. #include <sys/types.h>
  3458. #endif
  3459. #ifdef HAVE_SYS_TIME_H
  3460. #include <sys/time.h>
  3461. #endif
  3462. #ifdef HAVE_SYS_SELECT_H
  3463. #include <sys/select.h>
  3464. #endif
  3465. #ifdef HAVE_SYS_SOCKET_H
  3466. #include <sys/socket.h>
  3467. #endif
  3468. extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
  3469. int main() {
  3470.  
  3471. ; return 0; }
  3472. EOF
  3473. if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3474.   rm -rf conftest*
  3475.           ac_not_found=no ; break 3
  3476. else
  3477.   echo "configure: failed program was:" >&5
  3478.   cat conftest.$ac_ext >&5
  3479.   rm -rf conftest*
  3480.   ac_not_found=yes
  3481. fi
  3482. rm -f conftest*
  3483.       done
  3484.      done
  3485.     done
  3486.    
  3487. fi
  3488.   
  3489. fi
  3490.  
  3491. fi
  3492.  if test "$ac_not_found" = yes; then
  3493.   ac_cv_func_select_arg1=int 
  3494.   ac_cv_func_select_arg234='int *' 
  3495.   ac_cv_func_select_arg5='struct timeval *'
  3496.  fi
  3497.  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
  3498.  cat >> confdefs.h <<EOF
  3499. #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
  3500. EOF
  3501.  
  3502.  cat >> confdefs.h <<EOF
  3503. #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
  3504. EOF
  3505.  
  3506.  cat >> confdefs.h <<EOF
  3507. #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
  3508. EOF
  3509.  
  3510.  
  3511.  
  3512.  
  3513. if test "$with_linux_vga" = yes; then
  3514.   echo $ac_n "checking for linux vga library""... $ac_c" 1>&6
  3515. echo "configure:3516: checking for linux vga library" >&5
  3516.   echo $ac_n "checking for vga_init in -lvga""... $ac_c" 1>&6
  3517. echo "configure:3518: checking for vga_init in -lvga" >&5
  3518. ac_lib_var=`echo vga'_'vga_init | sed 'y%./+-%__p_%'`
  3519. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3520.   echo $ac_n "(cached) $ac_c" 1>&6
  3521. else
  3522.   ac_save_LIBS="$LIBS"
  3523. LIBS="-lvga  $LIBS"
  3524. cat > conftest.$ac_ext <<EOF
  3525. #line 3526 "configure"
  3526. #include "confdefs.h"
  3527. /* Override any gcc2 internal prototype to avoid an error.  */
  3528. /* We use char because int might match the return type of a gcc2
  3529.     builtin and then its argument prototype would still apply.  */
  3530. char vga_init();
  3531.  
  3532. int main() {
  3533. vga_init()
  3534. ; return 0; }
  3535. EOF
  3536. if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3537.   rm -rf conftest*
  3538.   eval "ac_cv_lib_$ac_lib_var=yes"
  3539. else
  3540.   echo "configure: failed program was:" >&5
  3541.   cat conftest.$ac_ext >&5
  3542.   rm -rf conftest*
  3543.   eval "ac_cv_lib_$ac_lib_var=no"
  3544. fi
  3545. rm -f conftest*
  3546. LIBS="$ac_save_LIBS"
  3547.  
  3548. fi
  3549. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3550.   echo "$ac_t""yes" 1>&6
  3551.   cat >> confdefs.h <<\EOF
  3552. #define LINUXVGA 1
  3553. EOF
  3554.  
  3555.      LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot'
  3556.      TERMLIBS="$TERMLIBS -lvga"
  3557. else
  3558.   echo "$ac_t""no" 1>&6
  3559.     with_linux_vga=no
  3560. fi
  3561.  
  3562. fi
  3563.  
  3564. if test "$with_gnu_readline" != no; then
  3565.       gp_tcap=""
  3566.   for termlib in ncurses curses termcap terminfo termlib; do
  3567.     echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6
  3568. echo "configure:3569: checking for tputs in -l${termlib}" >&5
  3569. ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'`
  3570. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3571.   echo $ac_n "(cached) $ac_c" 1>&6
  3572. else
  3573.   ac_save_LIBS="$LIBS"
  3574. LIBS="-l${termlib}  $LIBS"
  3575. cat > conftest.$ac_ext <<EOF
  3576. #line 3577 "configure"
  3577. #include "confdefs.h"
  3578. /* Override any gcc2 internal prototype to avoid an error.  */
  3579. /* We use char because int might match the return type of a gcc2
  3580.     builtin and then its argument prototype would still apply.  */
  3581. char tputs();
  3582.  
  3583. int main() {
  3584. tputs()
  3585. ; return 0; }
  3586. EOF
  3587. if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3588.   rm -rf conftest*
  3589.   eval "ac_cv_lib_$ac_lib_var=yes"
  3590. else
  3591.   echo "configure: failed program was:" >&5
  3592.   cat conftest.$ac_ext >&5
  3593.   rm -rf conftest*
  3594.   eval "ac_cv_lib_$ac_lib_var=no"
  3595. fi
  3596. rm -f conftest*
  3597. LIBS="$ac_save_LIBS"
  3598.  
  3599. fi
  3600. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3601.   echo "$ac_t""yes" 1>&6
  3602.   gp_tcap="${gp_tcap} -l${termlib}"
  3603. else
  3604.   echo "$ac_t""no" 1>&6
  3605. fi
  3606.  
  3607.     case "${gp_tcap}" in
  3608.       *-l${termlib}*)
  3609.         echo "$ac_t""using ${gp_tcap} with readline" 1>&6
  3610.         break
  3611.       ;;
  3612.     esac
  3613.   done
  3614.  
  3615.   if test "$with_gnu_readline" = yes; then
  3616.     echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
  3617. echo "configure:3618: checking for readline in -lreadline" >&5
  3618. ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
  3619. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3620.   echo $ac_n "(cached) $ac_c" 1>&6
  3621. else
  3622.   ac_save_LIBS="$LIBS"
  3623. LIBS="-lreadline      ${gp_tcap} $LIBS"
  3624. cat > conftest.$ac_ext <<EOF
  3625. #line 3626 "configure"
  3626. #include "confdefs.h"
  3627. /* Override any gcc2 internal prototype to avoid an error.  */
  3628. /* We use char because int might match the return type of a gcc2
  3629.     builtin and then its argument prototype would still apply.  */
  3630. char readline();
  3631.  
  3632. int main() {
  3633. readline()
  3634. ; return 0; }
  3635. EOF
  3636. if { (eval echo configure:3637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3637.   rm -rf conftest*
  3638.   eval "ac_cv_lib_$ac_lib_var=yes"
  3639. else
  3640.   echo "configure: failed program was:" >&5
  3641.   cat conftest.$ac_ext >&5
  3642.   rm -rf conftest*
  3643.   eval "ac_cv_lib_$ac_lib_var=no"
  3644. fi
  3645. rm -f conftest*
  3646. LIBS="$ac_save_LIBS"
  3647.  
  3648. fi
  3649. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3650.   echo "$ac_t""yes" 1>&6
  3651.        LIBS="$LIBS -lreadline $gp_tcap"
  3652.      cat >> confdefs.h <<\EOF
  3653. #define GNU_READLINE 1
  3654. EOF
  3655.  
  3656.      with_readline=no
  3657. else
  3658.   echo "$ac_t""no" 1>&6
  3659.      { echo "configure: error: Can't find -lreadline in a standard path -- specify its location using --with-gnu-readline=/path/to/libreadline.a" 1>&2; exit 1; }
  3660. fi
  3661.   else
  3662.     if test ! -f $with_gnu_readline ; then
  3663.       if test ! -f ${with_gnu_readline}/lib/libreadline.a ; then
  3664.         if test ! -f ${with_gnu_readline}/libreadline.a ; then
  3665.           { echo "configure: error: GNU readline library not found" 1>&2; exit 1; }
  3666.         else
  3667.           echo "$ac_t""using ${with_gnu_readline}/libreadline.a" 1>&6
  3668.           LIBS="$LIBS ${with_gnu_readline}/libreadline.a $gp_tcap"
  3669.         fi
  3670.       else
  3671.         echo "$ac_t""using ${with_gnu_readline}/lib/libreadline.a" 1>&6
  3672.         LIBS="$LIBS ${with_gnu_readline}/lib/libreadline.a $gp_tcap"
  3673.       fi
  3674.     else
  3675.       echo "$ac_t""using ${with_gnu_readline}" 1>&6
  3676.       LIBS="$LIBS $with_gnu_readline $gp_tcap"
  3677.     fi
  3678.  
  3679.     cat >> confdefs.h <<\EOF
  3680. #define GNU_READLINE 1
  3681. EOF
  3682.  
  3683.     with_readline=no
  3684.   fi
  3685. fi
  3686.  
  3687. test "$with_readline" = yes && cat >> confdefs.h <<\EOF
  3688. #define READLINE 1
  3689. EOF
  3690.  
  3691.  
  3692. if test "$with_plot" != no; then
  3693.   if test "$with_plot" = yes; then
  3694.         echo $ac_n "checking for openpl in -lplot""... $ac_c" 1>&6
  3695. echo "configure:3696: checking for openpl in -lplot" >&5
  3696. ac_lib_var=`echo plot'_'openpl | sed 'y%./+-%__p_%'`
  3697. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3698.   echo $ac_n "(cached) $ac_c" 1>&6
  3699. else
  3700.   ac_save_LIBS="$LIBS"
  3701. LIBS="-lplot  $LIBS"
  3702. cat > conftest.$ac_ext <<EOF
  3703. #line 3704 "configure"
  3704. #include "confdefs.h"
  3705. /* Override any gcc2 internal prototype to avoid an error.  */
  3706. /* We use char because int might match the return type of a gcc2
  3707.     builtin and then its argument prototype would still apply.  */
  3708. char openpl();
  3709.  
  3710. int main() {
  3711. openpl()
  3712. ; return 0; }
  3713. EOF
  3714. if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3715.   rm -rf conftest*
  3716.   eval "ac_cv_lib_$ac_lib_var=yes"
  3717. else
  3718.   echo "configure: failed program was:" >&5
  3719.   cat conftest.$ac_ext >&5
  3720.   rm -rf conftest*
  3721.   eval "ac_cv_lib_$ac_lib_var=no"
  3722. fi
  3723. rm -f conftest*
  3724. LIBS="$ac_save_LIBS"
  3725.  
  3726. fi
  3727. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3728.   echo "$ac_t""yes" 1>&6
  3729.        cat >> confdefs.h <<\EOF
  3730. #define UNIXPLOT 1
  3731. EOF
  3732.  
  3733.      TERMLIBS="$TERMLIBS -lplot"
  3734. else
  3735.   echo "$ac_t""no" 1>&6
  3736.      with_plot=no
  3737. fi
  3738.  
  3739.   else
  3740.         TERMXLIBS="$X_LIBS -lXaw -lXmu -lXt -lXext -lX11"
  3741.     echo $ac_n "checking for textangle in -lplot""... $ac_c" 1>&6
  3742. echo "configure:3743: checking for textangle in -lplot" >&5
  3743. gp_save_TERMLIBS="$TERMLIBS"
  3744.   gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3745.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3746. case "$with_plot" in
  3747.   yes|no)
  3748.     gp_lib_list="";;
  3749.   *)
  3750.     gp_lib_path=`echo $with_plot | sed -e 's%/libplot\.a$%%'`
  3751.     gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'`
  3752.     gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path"
  3753. esac
  3754. for ac_dir in '' /usr/local/lib $gp_lib_list ; do
  3755.   TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS"
  3756.   ac_lib_var=`echo plot'_'textangle | sed 'y%./+-%__p_%'`
  3757. ac_save_LIBS="$LIBS"
  3758. LIBS="$TERMLIBS $TERMXLIBS -lplot     $TERMXLIBS $LIBS"
  3759. cat > conftest.$ac_ext <<EOF
  3760. #line 3761 "configure"
  3761. #include "confdefs.h"
  3762. /* Override any gcc2 internal prototype to avoid an error.  */
  3763. /* We use char because int might match the return type of a gcc2
  3764.     builtin and then its argument prototype would still apply.  */
  3765. char textangle();
  3766.  
  3767. int main() {
  3768. textangle()
  3769. ; return 0; }
  3770. EOF
  3771. if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3772.   rm -rf conftest*
  3773.   eval "ac_cv_lib_$ac_lib_var=yes"
  3774. else
  3775.   echo "configure: failed program was:" >&5
  3776.   cat conftest.$ac_ext >&5
  3777.   rm -rf conftest*
  3778.   eval "ac_cv_lib_$ac_lib_var=no"
  3779. fi
  3780. rm -f conftest*
  3781. LIBS="$ac_save_LIBS"
  3782. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3783.       TERMLIBS="$TERMLIBS -lplot"; break
  3784. else
  3785.       TERMLIBS="$gp_save_TERMLIBS"
  3786. fi
  3787.                                done
  3788. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3789.   echo "$ac_t""yes" 1>&6
  3790. else
  3791.   echo "$ac_t""no" 1>&6
  3792. fi
  3793.  
  3794.     if test "$ac_cv_lib_plot_textangle" = no; then
  3795.       TERMXLIBS=
  3796.       echo $ac_n "checking for rotate in -lplot""... $ac_c" 1>&6
  3797. echo "configure:3798: checking for rotate in -lplot" >&5
  3798. gp_save_TERMLIBS="$TERMLIBS"
  3799.   gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3800.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3801. case "$with_plot" in
  3802.   yes|no)
  3803.     gp_lib_list="";;
  3804.   *)
  3805.     gp_lib_path=`echo $with_plot | sed -e 's%/libplot\.a$%%'`
  3806.     gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'`
  3807.     gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path"
  3808. esac
  3809. for ac_dir in '' /usr/local/lib $gp_lib_list ; do
  3810.   TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS"
  3811.   ac_lib_var=`echo plot'_'rotate | sed 'y%./+-%__p_%'`
  3812. ac_save_LIBS="$LIBS"
  3813. LIBS="$TERMLIBS $TERMXLIBS -lplot      $LIBS"
  3814. cat > conftest.$ac_ext <<EOF
  3815. #line 3816 "configure"
  3816. #include "confdefs.h"
  3817. /* Override any gcc2 internal prototype to avoid an error.  */
  3818. /* We use char because int might match the return type of a gcc2
  3819.     builtin and then its argument prototype would still apply.  */
  3820. char rotate();
  3821.  
  3822. int main() {
  3823. rotate()
  3824. ; return 0; }
  3825. EOF
  3826. if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3827.   rm -rf conftest*
  3828.   eval "ac_cv_lib_$ac_lib_var=yes"
  3829. else
  3830.   echo "configure: failed program was:" >&5
  3831.   cat conftest.$ac_ext >&5
  3832.   rm -rf conftest*
  3833.   eval "ac_cv_lib_$ac_lib_var=no"
  3834. fi
  3835. rm -f conftest*
  3836. LIBS="$ac_save_LIBS"
  3837. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3838.       TERMLIBS="$TERMLIBS -lplot"; break
  3839. else
  3840.       TERMLIBS="$gp_save_TERMLIBS"
  3841. fi
  3842.                                done
  3843. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3844.   echo "$ac_t""yes" 1>&6
  3845. else
  3846.   echo "$ac_t""no" 1>&6
  3847. fi
  3848.  
  3849.       if test "$ac_cv_lib_plot_rotate" = no; then
  3850.         echo "configure: warning: can't find GNU libplot -- disabling gnugraph terminal" 1>&2
  3851.         with_plot=no
  3852.       else
  3853.         echo "$ac_t"" - using obsolete GNU graphics library" 1>&6
  3854.         cat >> confdefs.h <<\EOF
  3855. #define GNUGRAPH 1
  3856. EOF
  3857.  
  3858.       fi # old GNU plotlib
  3859.     else
  3860.       echo "$ac_t"" - using GNU plotutils library" 1>&6
  3861.       cat >> confdefs.h <<\EOF
  3862. #define GNUGRAPH 1
  3863. EOF
  3864.  
  3865.       cat >> confdefs.h <<\EOF
  3866. #define GNU_PLOTUTILS 1
  3867. EOF
  3868.  
  3869.     fi # new GNU plotlib
  3870.   fi # Unix plotlib
  3871. fi
  3872.  
  3873. if test "$with_gd" != no; then
  3874.   echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6
  3875. echo "configure:3876: checking for gdImageCreate in -lgd" >&5
  3876. gp_save_TERMLIBS="$TERMLIBS"
  3877.   gp_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3878.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3879. case "$with_gd" in
  3880.   yes|no)
  3881.     gp_lib_list="";;
  3882.   *)
  3883.     gp_lib_path=`echo $with_gd | sed -e 's%/libgd\.a$%%'`
  3884.     gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'`
  3885.     gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path"
  3886. esac
  3887. for ac_dir in '' /usr/local/lib $gp_lib_list ; do
  3888.   TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS"
  3889.   ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'`
  3890. ac_save_LIBS="$LIBS"
  3891. LIBS="$TERMLIBS $TERMXLIBS -lgd      $LIBS"
  3892. cat > conftest.$ac_ext <<EOF
  3893. #line 3894 "configure"
  3894. #include "confdefs.h"
  3895. /* Override any gcc2 internal prototype to avoid an error.  */
  3896. /* We use char because int might match the return type of a gcc2
  3897.     builtin and then its argument prototype would still apply.  */
  3898. char gdImageCreate();
  3899.  
  3900. int main() {
  3901. gdImageCreate()
  3902. ; return 0; }
  3903. EOF
  3904. if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3905.   rm -rf conftest*
  3906.   eval "ac_cv_lib_$ac_lib_var=yes"
  3907. else
  3908.   echo "configure: failed program was:" >&5
  3909.   cat conftest.$ac_ext >&5
  3910.   rm -rf conftest*
  3911.   eval "ac_cv_lib_$ac_lib_var=no"
  3912. fi
  3913. rm -f conftest*
  3914. LIBS="$ac_save_LIBS"
  3915. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3916.       TERMLIBS="$TERMLIBS -lgd"; break
  3917. else
  3918.       TERMLIBS="$gp_save_TERMLIBS"
  3919. fi
  3920.                                done
  3921. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3922.   echo "$ac_t""yes" 1>&6
  3923. else
  3924.   echo "$ac_t""no" 1>&6
  3925. fi
  3926.  
  3927.   if test "$ac_cv_lib_gd_gdImageCreate" = yes; then
  3928.     
  3929. echo $ac_n "checking for gd.h""... $ac_c" 1>&6
  3930. echo "configure:3931: checking for gd.h" >&5
  3931. ac_safe=`echo "gd.h" | sed 'y%./+-%__p_%'`
  3932. gp_save_CPPFLAGS="$CPPFLAGS"
  3933. for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do
  3934.   CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`"
  3935.   cat > conftest.$ac_ext <<EOF
  3936. #line 3937 "configure"
  3937. #include "confdefs.h"
  3938. #include <gd.h>
  3939. EOF
  3940. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3941. { (eval echo configure:3942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3942. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3943. if test -z "$ac_err"; then
  3944.   rm -rf conftest*
  3945.   eval "ac_cv_header_$ac_safe=yes"
  3946. else
  3947.   echo "$ac_err" >&5
  3948.   echo "configure: failed program was:" >&5
  3949.   cat conftest.$ac_ext >&5
  3950.   rm -rf conftest*
  3951.   eval "ac_cv_header_$ac_safe=no"
  3952. fi
  3953. rm -f conftest*
  3954.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3955.     break
  3956.   else
  3957.     CPPFLAGS="${ac_save_CPPFLAGS}"
  3958.   fi
  3959. done
  3960. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3961.   echo "$ac_t""yes" 1>&6
  3962.   :
  3963. else
  3964.   echo "$ac_t""no" 1>&6
  3965. echo "configure: warning: found gd library but not gd.h" 1>&2
  3966.      echo "configure: warning: please add path to gd.h to CPPFLAGS in Makefile" 1>&2
  3967.     
  3968. fi
  3969.     cat >> confdefs.h <<\EOF
  3970. #define HAVE_LIBGD 1
  3971. EOF
  3972.  
  3973.   else
  3974.     echo "$ac_t""- see term/gif.trm for download details" 1>&6
  3975.   fi
  3976. fi
  3977.  
  3978. if test "$with_png" != no; then
  3979.   echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6
  3980. echo "configure:3981: checking for png_info_init in -lpng" >&5
  3981. gp_save_TERMLIBS="$TERMLIBS"
  3982.   gp_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3983.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3984. case "$with_png" in
  3985.   yes|no)
  3986.     gp_lib_list="";;
  3987.   *)
  3988.     gp_lib_path=`echo $with_png | sed -e 's%/libpng\.a$%%'`
  3989.     gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'`
  3990.     gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path"
  3991. esac
  3992. for ac_dir in '' /usr/local/lib $gp_lib_list ; do
  3993.   TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS"
  3994.   ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'`
  3995. ac_save_LIBS="$LIBS"
  3996. LIBS="$TERMLIBS $TERMXLIBS -lpng     -lz $LIBS"
  3997. cat > conftest.$ac_ext <<EOF
  3998. #line 3999 "configure"
  3999. #include "confdefs.h"
  4000. /* Override any gcc2 internal prototype to avoid an error.  */
  4001. /* We use char because int might match the return type of a gcc2
  4002.     builtin and then its argument prototype would still apply.  */
  4003. char png_info_init();
  4004.  
  4005. int main() {
  4006. png_info_init()
  4007. ; return 0; }
  4008. EOF
  4009. if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4010.   rm -rf conftest*
  4011.   eval "ac_cv_lib_$ac_lib_var=yes"
  4012. else
  4013.   echo "configure: failed program was:" >&5
  4014.   cat conftest.$ac_ext >&5
  4015.   rm -rf conftest*
  4016.   eval "ac_cv_lib_$ac_lib_var=no"
  4017. fi
  4018. rm -f conftest*
  4019. LIBS="$ac_save_LIBS"
  4020. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4021.       TERMLIBS="$TERMLIBS -lpng"; break
  4022. else
  4023.       TERMLIBS="$gp_save_TERMLIBS"
  4024. fi
  4025.                                done
  4026. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4027.   echo "$ac_t""yes" 1>&6
  4028. else
  4029.   echo "$ac_t""no" 1>&6
  4030. fi
  4031.  
  4032.   if test "$ac_cv_lib_png_png_info_init" = yes; then
  4033.     TERMLIBS="$TERMLIBS -lz"
  4034.     
  4035. echo $ac_n "checking for png.h""... $ac_c" 1>&6
  4036. echo "configure:4037: checking for png.h" >&5
  4037. ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
  4038. gp_save_CPPFLAGS="$CPPFLAGS"
  4039. for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do
  4040.   CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`"
  4041.   cat > conftest.$ac_ext <<EOF
  4042. #line 4043 "configure"
  4043. #include "confdefs.h"
  4044. #include <png.h>
  4045. EOF
  4046. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4047. { (eval echo configure:4048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4048. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4049. if test -z "$ac_err"; then
  4050.   rm -rf conftest*
  4051.   eval "ac_cv_header_$ac_safe=yes"
  4052. else
  4053.   echo "$ac_err" >&5
  4054.   echo "configure: failed program was:" >&5
  4055.   cat conftest.$ac_ext >&5
  4056.   rm -rf conftest*
  4057.   eval "ac_cv_header_$ac_safe=no"
  4058. fi
  4059. rm -f conftest*
  4060.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4061.     break
  4062.   else
  4063.     CPPFLAGS="${ac_save_CPPFLAGS}"
  4064.   fi
  4065. done
  4066. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4067.   echo "$ac_t""yes" 1>&6
  4068.   :
  4069. else
  4070.   echo "$ac_t""no" 1>&6
  4071. echo "configure: warning: found png library but not png.h" 1>&2
  4072.      echo "configure: warning: please add path to png.h to CPPFLAGS in Makefile" 1>&2
  4073.     
  4074. fi
  4075.     
  4076. echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
  4077. echo "configure:4078: checking for zlib.h" >&5
  4078. ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
  4079. gp_save_CPPFLAGS="$CPPFLAGS"
  4080. for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do
  4081.   CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`"
  4082.   cat > conftest.$ac_ext <<EOF
  4083. #line 4084 "configure"
  4084. #include "confdefs.h"
  4085. #include <zlib.h>
  4086. EOF
  4087. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4088. { (eval echo configure:4089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4089. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  4090. if test -z "$ac_err"; then
  4091.   rm -rf conftest*
  4092.   eval "ac_cv_header_$ac_safe=yes"
  4093. else
  4094.   echo "$ac_err" >&5
  4095.   echo "configure: failed program was:" >&5
  4096.   cat conftest.$ac_ext >&5
  4097.   rm -rf conftest*
  4098.   eval "ac_cv_header_$ac_safe=no"
  4099. fi
  4100. rm -f conftest*
  4101.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4102.     break
  4103.   else
  4104.     CPPFLAGS="${ac_save_CPPFLAGS}"
  4105.   fi
  4106. done
  4107. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4108.   echo "$ac_t""yes" 1>&6
  4109.   :
  4110. else
  4111.   echo "$ac_t""no" 1>&6
  4112. echo "configure: warning: found z library but not zlib.h" 1>&2
  4113.      echo "configure: warning: please add path to zlib.h to CPPFLAGS in Makefile" 1>&2
  4114.     
  4115. fi
  4116.     if test "$ac_cv_header_png_h" = yes; then
  4117.       cat > conftest.$ac_ext <<EOF
  4118. #line 4119 "configure"
  4119. #include "confdefs.h"
  4120. #include "png.h"
  4121. #if PNG_LIBPNG_VER < 89
  4122. You lose.
  4123. #endif
  4124.  
  4125. EOF
  4126. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4127.   egrep "You lose" >/dev/null 2>&1; then
  4128.   rm -rf conftest*
  4129.          echo "configure: warning: - libpng too old - not including png driver" 1>&2
  4130. else
  4131.   rm -rf conftest*
  4132.          cat >> confdefs.h <<\EOF
  4133. #define HAVE_LIBPNG 1
  4134. EOF
  4135.  
  4136. fi
  4137. rm -f conftest*
  4138.  
  4139.     else
  4140.       echo "configure: warning: - cannot check png version - compilation may fail" 1>&2
  4141.       cat >> confdefs.h <<\EOF
  4142. #define HAVE_LIBPNG 1
  4143. EOF
  4144.  
  4145.     fi
  4146.   else
  4147.     echo "$ac_t""- see term/png.trm for download details" 1>&6
  4148.   fi
  4149. fi
  4150.  
  4151. echo $ac_n "checking terminal driver sources""... $ac_c" 1>&6
  4152. echo "configure:4153: checking terminal driver sources" >&5
  4153. ( cd $srcdir/term && for i in *.trm ; do echo '${srcdir}'/../term/$i ; done )\
  4154.  |(tr '\012' @; echo) |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012' >termlist
  4155. TERM_LIST=termlist
  4156.  
  4157. echo "$ac_t""list created" 1>&6
  4158.  
  4159.  
  4160.  
  4161. if test "$enable_apollo" = yes; then
  4162.   cat > conftest.$ac_ext <<EOF
  4163. #line 4164 "configure"
  4164. #include "confdefs.h"
  4165. #ifdef apollo
  4166.      yes
  4167.     #endif
  4168.    
  4169. EOF
  4170. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4171.   egrep "yes" >/dev/null 2>&1; then
  4172.   rm -rf conftest*
  4173.   cat >> confdefs.h <<\EOF
  4174. #define APOLLO 1
  4175. EOF
  4176.  
  4177. else
  4178.   rm -rf conftest*
  4179.      enable_apollo=no
  4180. fi
  4181. rm -f conftest*
  4182.  
  4183. fi
  4184.  
  4185. if test "$enable_gpr" = yes; then
  4186.   cat > conftest.$ac_ext <<EOF
  4187. #line 4188 "configure"
  4188. #include "confdefs.h"
  4189. #ifdef apollo 
  4190.      yes
  4191.     #endif
  4192.    
  4193. EOF
  4194. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4195.   egrep "yes" >/dev/null 2>&1; then
  4196.   rm -rf conftest*
  4197.   cat >> confdefs.h <<\EOF
  4198. #define APOLLO 1
  4199. EOF
  4200.  cat >> confdefs.h <<\EOF
  4201. #define GPR 1
  4202. EOF
  4203.  
  4204. else
  4205.   rm -rf conftest*
  4206.      enable_gpr=no
  4207. fi
  4208. rm -f conftest*
  4209.  
  4210. fi
  4211.  
  4212. if test "$enable_cgi" = yes; then
  4213.   cat > conftest.$ac_ext <<EOF
  4214. #line 4215 "configure"
  4215. #include "confdefs.h"
  4216. #ifdef SCO
  4217.      yes
  4218.     #endif
  4219.    
  4220. EOF
  4221. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4222.   egrep "yes" >/dev/null 2>&1; then
  4223.   rm -rf conftest*
  4224.   echo $ac_n "checking for v_opnwk in -lccgi""... $ac_c" 1>&6
  4225. echo "configure:4226: checking for v_opnwk in -lccgi" >&5
  4226. ac_lib_var=`echo ccgi'_'v_opnwk | sed 'y%./+-%__p_%'`
  4227. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4228.   echo $ac_n "(cached) $ac_c" 1>&6
  4229. else
  4230.   ac_save_LIBS="$LIBS"
  4231. LIBS="-lccgi  $LIBS"
  4232. cat > conftest.$ac_ext <<EOF
  4233. #line 4234 "configure"
  4234. #include "confdefs.h"
  4235. /* Override any gcc2 internal prototype to avoid an error.  */
  4236. /* We use char because int might match the return type of a gcc2
  4237.     builtin and then its argument prototype would still apply.  */
  4238. char v_opnwk();
  4239.  
  4240. int main() {
  4241. v_opnwk()
  4242. ; return 0; }
  4243. EOF
  4244. if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4245.   rm -rf conftest*
  4246.   eval "ac_cv_lib_$ac_lib_var=yes"
  4247. else
  4248.   echo "configure: failed program was:" >&5
  4249.   cat conftest.$ac_ext >&5
  4250.   rm -rf conftest*
  4251.   eval "ac_cv_lib_$ac_lib_var=no"
  4252. fi
  4253. rm -f conftest*
  4254. LIBS="$ac_save_LIBS"
  4255.  
  4256. fi
  4257. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4258.   echo "$ac_t""yes" 1>&6
  4259.         cat >> confdefs.h <<\EOF
  4260. #define CGI 1
  4261. EOF
  4262.  
  4263.       TERMLIBS="$TERMLIBS -lccgi"
  4264. else
  4265.   echo "$ac_t""no" 1>&6
  4266. fi
  4267.  
  4268. else
  4269.   rm -rf conftest*
  4270.      enable_cgi=no
  4271. fi
  4272. rm -f conftest*
  4273.  
  4274. fi
  4275.  
  4276. if test "$enable_iris" = yes; then
  4277.   echo $ac_n "checking for winopen in -lgl_s""... $ac_c" 1>&6
  4278. echo "configure:4279: checking for winopen in -lgl_s" >&5
  4279. ac_lib_var=`echo gl_s'_'winopen | sed 'y%./+-%__p_%'`
  4280. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4281.   echo $ac_n "(cached) $ac_c" 1>&6
  4282. else
  4283.   ac_save_LIBS="$LIBS"
  4284. LIBS="-lgl_s  $LIBS"
  4285. cat > conftest.$ac_ext <<EOF
  4286. #line 4287 "configure"
  4287. #include "confdefs.h"
  4288. /* Override any gcc2 internal prototype to avoid an error.  */
  4289. /* We use char because int might match the return type of a gcc2
  4290.     builtin and then its argument prototype would still apply.  */
  4291. char winopen();
  4292.  
  4293. int main() {
  4294. winopen()
  4295. ; return 0; }
  4296. EOF
  4297. if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4298.   rm -rf conftest*
  4299.   eval "ac_cv_lib_$ac_lib_var=yes"
  4300. else
  4301.   echo "configure: failed program was:" >&5
  4302.   cat conftest.$ac_ext >&5
  4303.   rm -rf conftest*
  4304.   eval "ac_cv_lib_$ac_lib_var=no"
  4305. fi
  4306. rm -f conftest*
  4307. LIBS="$ac_save_LIBS"
  4308.  
  4309. fi
  4310. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4311.   echo "$ac_t""yes" 1>&6
  4312.      cat >> confdefs.h <<\EOF
  4313. #define IRIS 1
  4314. EOF
  4315.  
  4316.    TERMLIBS="$TERMLIBS -lgl_s"
  4317. else
  4318.   echo "$ac_t""no" 1>&6
  4319.    enable_iris=no
  4320. fi
  4321.  
  4322. fi
  4323.  
  4324. if test "$enable_mgr" = yes; then
  4325.   echo $ac_n "checking for m_getinfo in -lmgr""... $ac_c" 1>&6
  4326. echo "configure:4327: checking for m_getinfo in -lmgr" >&5
  4327. ac_lib_var=`echo mgr'_'m_getinfo | sed 'y%./+-%__p_%'`
  4328. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4329.   echo $ac_n "(cached) $ac_c" 1>&6
  4330. else
  4331.   ac_save_LIBS="$LIBS"
  4332. LIBS="-lmgr -lpixrect $LIBS"
  4333. cat > conftest.$ac_ext <<EOF
  4334. #line 4335 "configure"
  4335. #include "confdefs.h"
  4336. /* Override any gcc2 internal prototype to avoid an error.  */
  4337. /* We use char because int might match the return type of a gcc2
  4338.     builtin and then its argument prototype would still apply.  */
  4339. char m_getinfo();
  4340.  
  4341. int main() {
  4342. m_getinfo()
  4343. ; return 0; }
  4344. EOF
  4345. if { (eval echo configure:4346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4346.   rm -rf conftest*
  4347.   eval "ac_cv_lib_$ac_lib_var=yes"
  4348. else
  4349.   echo "configure: failed program was:" >&5
  4350.   cat conftest.$ac_ext >&5
  4351.   rm -rf conftest*
  4352.   eval "ac_cv_lib_$ac_lib_var=no"
  4353. fi
  4354. rm -f conftest*
  4355. LIBS="$ac_save_LIBS"
  4356.  
  4357. fi
  4358. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4359.   echo "$ac_t""yes" 1>&6
  4360.      cat >> confdefs.h <<\EOF
  4361. #define MGR 1
  4362. EOF
  4363.    TERMLIBS="$TERMLIBS -lmgr -lpixrect"
  4364. else
  4365.   echo "$ac_t""no" 1>&6
  4366.    enable_mgr=no
  4367. fi
  4368.  
  4369. fi
  4370.  
  4371. if test "$enable_rgip" = yes; then
  4372.   cat >> confdefs.h <<\EOF
  4373. #define RGIP 1
  4374. EOF
  4375.  
  4376. fi
  4377.  
  4378. if test "$enable_sun" = yes; then
  4379.   echo $ac_n "checking for window_create in -lsuntool""... $ac_c" 1>&6
  4380. echo "configure:4381: checking for window_create in -lsuntool" >&5
  4381. ac_lib_var=`echo suntool'_'window_create | sed 'y%./+-%__p_%'`
  4382. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4383.   echo $ac_n "(cached) $ac_c" 1>&6
  4384. else
  4385.   ac_save_LIBS="$LIBS"
  4386. LIBS="-lsuntool -lsunwindow -lpixrect $LIBS"
  4387. cat > conftest.$ac_ext <<EOF
  4388. #line 4389 "configure"
  4389. #include "confdefs.h"
  4390. /* Override any gcc2 internal prototype to avoid an error.  */
  4391. /* We use char because int might match the return type of a gcc2
  4392.     builtin and then its argument prototype would still apply.  */
  4393. char window_create();
  4394.  
  4395. int main() {
  4396. window_create()
  4397. ; return 0; }
  4398. EOF
  4399. if { (eval echo configure:4400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4400.   rm -rf conftest*
  4401.   eval "ac_cv_lib_$ac_lib_var=yes"
  4402. else
  4403.   echo "configure: failed program was:" >&5
  4404.   cat conftest.$ac_ext >&5
  4405.   rm -rf conftest*
  4406.   eval "ac_cv_lib_$ac_lib_var=no"
  4407. fi
  4408. rm -f conftest*
  4409. LIBS="$ac_save_LIBS"
  4410.  
  4411. fi
  4412. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4413.   echo "$ac_t""yes" 1>&6
  4414.      cat >> confdefs.h <<\EOF
  4415. #define SUN 1
  4416. EOF
  4417.    TERMLIBS="$TERMLIBS -lsuntool -lsunwindow -lpixrect"
  4418. else
  4419.   echo "$ac_t""no" 1>&6
  4420.    enable_sun=no
  4421. fi
  4422.  
  4423. fi
  4424.  
  4425. if test "$enable_unixpc" = yes; then
  4426.   cat > conftest.$ac_ext <<EOF
  4427. #line 4428 "configure"
  4428. #include "confdefs.h"
  4429. /* Not sure about this; definitely
  4430.      * true for gcc */
  4431.     #ifdef unixpc
  4432.      yes
  4433.     #endif
  4434.    
  4435. EOF
  4436. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4437.   egrep "yes" >/dev/null 2>&1; then
  4438.   rm -rf conftest*
  4439.   cat >> confdefs.h <<\EOF
  4440. #define UNIXPC 1
  4441. EOF
  4442.  
  4443. else
  4444.   rm -rf conftest*
  4445.      enable_unixpc=no
  4446. fi
  4447. rm -f conftest*
  4448.  
  4449. fi
  4450.  
  4451. if test "$enable_system_time" = yes; then
  4452.   cat >> confdefs.h <<\EOF
  4453. #define USE_SYSTEM_TIME 1
  4454. EOF
  4455.  
  4456. fi
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467. eval gp_datadir=$datadir
  4468. test $gp_datadir = NONE/share && gp_datadir=/usr/local/share
  4469. echo "$ac_t""
  4470. ** Configuration summary for $PACKAGE $VERSION:
  4471.  
  4472.   Where is the help file?           $gp_datadir/gnuplot.gih
  4473. " 1>&6
  4474. test "$ac_cv_header_gd_h" = yes && \
  4475.   echo "$ac_t""  Enable generation of GIF files." 1>&6
  4476.  
  4477. test "$ac_cv_header_zlib_h" = yes && \
  4478.   echo "$ac_t""  Enable generation of PNG files." 1>&6
  4479.  
  4480. test "$with_cwdrc" = yes && \
  4481.   echo "$ac_t""  Check current directory for .gnuplot file." 1>&6
  4482.  
  4483. if test "$with_gnu_readline" != no; then
  4484.   echo "$ac_t""  Use GNU readline library." 1>&6
  4485. else
  4486.   test "$with_readline" != no && \
  4487.     echo "$ac_t""  Use included readline." 1>&6
  4488. fi
  4489.  
  4490. if test "$with_plot" = yes; then
  4491.   echo "$ac_t""  Use the Unix plot library." 1>&6
  4492. elif test "$with_plot" != no; then
  4493.   echo "$ac_t""  Use the GNU plot library." 1>&6
  4494. fi
  4495.  
  4496. test "$with_lasergnu" = yes && \
  4497.   echo "$ac_t""  Install lasergnu printer script." 1>&6
  4498.  
  4499. test "$with_linux_vga" = yes && \
  4500.   echo "$ac_t""  Use the Linux console driver." 1>&6
  4501.  
  4502. test "$enable_apollo" = yes && \
  4503.   echo "$ac_t""  Enable Apollo terminal (resizeable window)." 1>&6
  4504.  
  4505. test "$enable_cgi" = yes && \
  4506.   echo "$ac_t""  Enable cgi terminal (SCO)." 1>&6
  4507.  
  4508. test "$enable_gpr" = yes && \
  4509.   echo "$ac_t""  Enable Apollo terminal (fixed-size window)." 1>&6
  4510.  
  4511. test "$enable_iris" = yes && \
  4512.   echo "$ac_t""  Enable IRIS terminal." 1>&6
  4513.  
  4514. test "$enable_mgr" = yes && \
  4515.   echo "$ac_t""  Enable MGR terminal." 1>&6
  4516.  
  4517. test "$enable_rgip" = yes && \
  4518.   echo "$ac_t""  Enable RGIP terminal." 1>&6
  4519.  
  4520. test "$enable_sun" = yes && \
  4521.   echo "$ac_t""  Enable sunview terminal." 1>&6
  4522.  
  4523. test "$enable_unixpc" = yes && \
  4524.   echo "$ac_t""  Enable unixpc terminal (ATT 3b1 or ATT 7300)." 1>&6
  4525.  
  4526. test "$enable_system_time" = yes && \
  4527.   echo "$ac_t""  Use system time routines in time.c." 1>&6
  4528.  
  4529. test "$no_x" != yes && \
  4530.   echo "$ac_t""  Use the X Window System.
  4531. " 1>&6
  4532.  
  4533. trap '' 1 2 15
  4534. cat > confcache <<\EOF
  4535. # This file is a shell script that caches the results of configure
  4536. # tests run on this system so they can be shared between configure
  4537. # scripts and configure runs.  It is not useful on other systems.
  4538. # If it contains results you don't want to keep, you may remove or edit it.
  4539. #
  4540. # By default, configure uses ./config.cache as the cache file,
  4541. # creating it if it does not exist already.  You can give configure
  4542. # the --cache-file=FILE option to use a different cache file; that is
  4543. # what configure does when it calls configure scripts in
  4544. # subdirectories, so they share the cache.
  4545. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  4546. # config.status only pays attention to the cache file if you give it the
  4547. # --recheck option to rerun configure.
  4548. #
  4549. EOF
  4550. # The following way of writing the cache mishandles newlines in values,
  4551. # but we know of no workaround that is simple, portable, and efficient.
  4552. # So, don't put newlines in cache variables' values.
  4553. # Ultrix sh set writes to stderr and can't be redirected directly,
  4554. # and sets the high bit in the cache file unless we assign to the vars.
  4555. (set) 2>&1 |
  4556.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  4557.   *ac_space=\ *)
  4558.     # `set' does not quote correctly, so add quotes (double-quote substitution
  4559.     # turns \\\\ into \\, and sed turns \\ into \).
  4560.     sed -n \
  4561.       -e "s/'/'\\\\''/g" \
  4562.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  4563.     ;;
  4564.   *)
  4565.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  4566.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  4567.     ;;
  4568.   esac >> confcache
  4569. if cmp -s $cache_file confcache; then
  4570.   :
  4571. else
  4572.   if test -w $cache_file; then
  4573.     echo "updating cache $cache_file"
  4574.     cat confcache > $cache_file
  4575.   else
  4576.     echo "not updating unwritable cache $cache_file"
  4577.   fi
  4578. fi
  4579. rm -f confcache
  4580.  
  4581. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4582.  
  4583. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4584. # Let make expand exec_prefix.
  4585. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4586.  
  4587. # Any assignment to VPATH causes Sun make to only execute
  4588. # the first set of double-colon rules, so remove it if not needed.
  4589. # If there is a colon in the path, we need to keep it.
  4590. if test "x$srcdir" = x.; then
  4591.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  4592. fi
  4593.  
  4594. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  4595.  
  4596. DEFS=-DHAVE_CONFIG_H
  4597.  
  4598. # Without the "./", some shells look in PATH for config.status.
  4599. : ${CONFIG_STATUS=./config.status}
  4600.  
  4601. echo creating $CONFIG_STATUS
  4602. rm -f $CONFIG_STATUS
  4603. cat > $CONFIG_STATUS <<EOF
  4604. #! /bin/sh
  4605. # Generated automatically by configure.
  4606. # Run this file to recreate the current configuration.
  4607. # This directory was configured as follows,
  4608. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4609. #
  4610. # $0 $ac_configure_args
  4611. #
  4612. # Compiler output produced by configure, useful for debugging
  4613. # configure, is in ./config.log if it exists.
  4614.  
  4615. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  4616. for ac_option
  4617. do
  4618.   case "\$ac_option" in
  4619.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4620.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  4621.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  4622.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  4623.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  4624.     exit 0 ;;
  4625.   -help | --help | --hel | --he | --h)
  4626.     echo "\$ac_cs_usage"; exit 0 ;;
  4627.   *) echo "\$ac_cs_usage"; exit 1 ;;
  4628.   esac
  4629. done
  4630.  
  4631. ac_given_srcdir=$srcdir
  4632. ac_given_INSTALL="$INSTALL"
  4633.  
  4634. trap 'rm -fr `echo "Makefile docs/Makefile docs/latextut/Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  4635. EOF
  4636. cat >> $CONFIG_STATUS <<EOF
  4637.  
  4638. # Protect against being on the right side of a sed subst in config.status.
  4639. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  4640.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  4641. $ac_vpsub
  4642. $extrasub
  4643. s%@SHELL@%$SHELL%g
  4644. s%@CFLAGS@%$CFLAGS%g
  4645. s%@CPPFLAGS@%$CPPFLAGS%g
  4646. s%@CXXFLAGS@%$CXXFLAGS%g
  4647. s%@FFLAGS@%$FFLAGS%g
  4648. s%@DEFS@%$DEFS%g
  4649. s%@LDFLAGS@%$LDFLAGS%g
  4650. s%@LIBS@%$LIBS%g
  4651. s%@exec_prefix@%$exec_prefix%g
  4652. s%@prefix@%$prefix%g
  4653. s%@program_transform_name@%$program_transform_name%g
  4654. s%@bindir@%$bindir%g
  4655. s%@sbindir@%$sbindir%g
  4656. s%@libexecdir@%$libexecdir%g
  4657. s%@datadir@%$datadir%g
  4658. s%@sysconfdir@%$sysconfdir%g
  4659. s%@sharedstatedir@%$sharedstatedir%g
  4660. s%@localstatedir@%$localstatedir%g
  4661. s%@libdir@%$libdir%g
  4662. s%@includedir@%$includedir%g
  4663. s%@oldincludedir@%$oldincludedir%g
  4664. s%@infodir@%$infodir%g
  4665. s%@mandir@%$mandir%g
  4666. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  4667. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  4668. s%@INSTALL_DATA@%$INSTALL_DATA%g
  4669. s%@PACKAGE@%$PACKAGE%g
  4670. s%@VERSION@%$VERSION%g
  4671. s%@ACLOCAL@%$ACLOCAL%g
  4672. s%@AUTOCONF@%$AUTOCONF%g
  4673. s%@AUTOMAKE@%$AUTOMAKE%g
  4674. s%@AUTOHEADER@%$AUTOHEADER%g
  4675. s%@MAKEINFO@%$MAKEINFO%g
  4676. s%@SET_MAKE@%$SET_MAKE%g
  4677. s%@CC@%$CC%g
  4678. s%@CPP@%$CPP%g
  4679. s%@U@%$U%g
  4680. s%@ANSI2KNR@%$ANSI2KNR%g
  4681. s%@ERRORFIX@%$ERRORFIX%g
  4682. s%@X_LIBRARIES@%$X_LIBRARIES%g
  4683. s%@GNUPLOT_X11@%$GNUPLOT_X11%g
  4684. s%@X_CFLAGS@%$X_CFLAGS%g
  4685. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  4686. s%@X_LIBS@%$X_LIBS%g
  4687. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  4688. /@TERM_LIST@/r $TERM_LIST
  4689. s%@TERM_LIST@%%g
  4690. s%@LASERGNU@%$LASERGNU%g
  4691. s%@LINUXSUID@%$LINUXSUID%g
  4692. s%@NEXTOBJS@%$NEXTOBJS%g
  4693. s%@TERMLIBS@%$TERMLIBS%g
  4694. s%@TERMXLIBS@%$TERMXLIBS%g
  4695.  
  4696. CEOF
  4697. EOF
  4698.  
  4699. cat >> $CONFIG_STATUS <<\EOF
  4700.  
  4701. # Split the substitutions into bite-sized pieces for seds with
  4702. # small command number limits, like on Digital OSF/1 and HP-UX.
  4703. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  4704. ac_file=1 # Number of current file.
  4705. ac_beg=1 # First line for current file.
  4706. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  4707. ac_more_lines=:
  4708. ac_sed_cmds=""
  4709. while $ac_more_lines; do
  4710.   if test $ac_beg -gt 1; then
  4711.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  4712.   else
  4713.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  4714.   fi
  4715.   if test ! -s conftest.s$ac_file; then
  4716.     ac_more_lines=false
  4717.     rm -f conftest.s$ac_file
  4718.   else
  4719.     if test -z "$ac_sed_cmds"; then
  4720.       ac_sed_cmds="sed -f conftest.s$ac_file"
  4721.     else
  4722.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  4723.     fi
  4724.     ac_file=`expr $ac_file + 1`
  4725.     ac_beg=$ac_end
  4726.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  4727.   fi
  4728. done
  4729. if test -z "$ac_sed_cmds"; then
  4730.   ac_sed_cmds=cat
  4731. fi
  4732. EOF
  4733.  
  4734. cat >> $CONFIG_STATUS <<EOF
  4735.  
  4736. CONFIG_FILES=\${CONFIG_FILES-"Makefile docs/Makefile docs/latextut/Makefile"}
  4737. EOF
  4738. cat >> $CONFIG_STATUS <<\EOF
  4739. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  4740.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  4741.   case "$ac_file" in
  4742.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  4743.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4744.   *) ac_file_in="${ac_file}.in" ;;
  4745.   esac
  4746.  
  4747.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  4748.  
  4749.   # Remove last slash and all that follows it.  Not all systems have dirname.
  4750.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4751.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4752.     # The file is in a subdirectory.
  4753.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  4754.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  4755.     # A "../" for each directory in $ac_dir_suffix.
  4756.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  4757.   else
  4758.     ac_dir_suffix= ac_dots=
  4759.   fi
  4760.  
  4761.   case "$ac_given_srcdir" in
  4762.   .)  srcdir=.
  4763.       if test -z "$ac_dots"; then top_srcdir=.
  4764.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  4765.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  4766.   *) # Relative path.
  4767.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  4768.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  4769.   esac
  4770.  
  4771.   case "$ac_given_INSTALL" in
  4772.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  4773.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  4774.   esac
  4775.  
  4776.   echo creating "$ac_file"
  4777.   rm -f "$ac_file"
  4778.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  4779.   case "$ac_file" in
  4780.   *Makefile*) ac_comsub="1i\\
  4781. # $configure_input" ;;
  4782.   *) ac_comsub= ;;
  4783.   esac
  4784.  
  4785.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  4786.   sed -e "$ac_comsub
  4787. s%@configure_input@%$configure_input%g
  4788. s%@srcdir@%$srcdir%g
  4789. s%@top_srcdir@%$top_srcdir%g
  4790. s%@INSTALL@%$INSTALL%g
  4791. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  4792. fi; done
  4793. rm -f conftest.s*
  4794.  
  4795. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  4796. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  4797. #
  4798. # ac_d sets the value in "#define NAME VALUE" lines.
  4799. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  4800. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  4801. ac_dC='\3'
  4802. ac_dD='%g'
  4803. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  4804. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4805. ac_uB='\([     ]\)%\1#\2define\3'
  4806. ac_uC=' '
  4807. ac_uD='\4%g'
  4808. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  4809. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4810. ac_eB='$%\1#\2define\3'
  4811. ac_eC=' '
  4812. ac_eD='%g'
  4813.  
  4814. if test "${CONFIG_HEADERS+set}" != set; then
  4815. EOF
  4816. cat >> $CONFIG_STATUS <<EOF
  4817.   CONFIG_HEADERS="config.h:config.hin"
  4818. EOF
  4819. cat >> $CONFIG_STATUS <<\EOF
  4820. fi
  4821. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  4822.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  4823.   case "$ac_file" in
  4824.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  4825.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4826.   *) ac_file_in="${ac_file}.in" ;;
  4827.   esac
  4828.  
  4829.   echo creating $ac_file
  4830.  
  4831.   rm -f conftest.frag conftest.in conftest.out
  4832.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  4833.   cat $ac_file_inputs > conftest.in
  4834.  
  4835. EOF
  4836.  
  4837. # Transform confdefs.h into a sed script conftest.vals that substitutes
  4838. # the proper values into config.h.in to produce config.h.  And first:
  4839. # Protect against being on the right side of a sed subst in config.status.
  4840. # Protect against being in an unquoted here document in config.status.
  4841. rm -f conftest.vals
  4842. cat > conftest.hdr <<\EOF
  4843. s/[\\&%]/\\&/g
  4844. s%[\\$`]%\\&%g
  4845. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  4846. s%ac_d%ac_u%gp
  4847. s%ac_u%ac_e%gp
  4848. EOF
  4849. sed -n -f conftest.hdr confdefs.h > conftest.vals
  4850. rm -f conftest.hdr
  4851.  
  4852. # This sed command replaces #undef with comments.  This is necessary, for
  4853. # example, in the case of _POSIX_SOURCE, which is predefined and required
  4854. # on some systems where configure will not decide to define it.
  4855. cat >> conftest.vals <<\EOF
  4856. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  4857. EOF
  4858.  
  4859. # Break up conftest.vals because some shells have a limit on
  4860. # the size of here documents, and old seds have small limits too.
  4861.  
  4862. rm -f conftest.tail
  4863. while :
  4864. do
  4865.   ac_lines=`grep -c . conftest.vals`
  4866.   # grep -c gives empty output for an empty file on some AIX systems.
  4867.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  4868.   # Write a limited-size here document to conftest.frag.
  4869.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  4870.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  4871.   echo 'CEOF
  4872.   sed -f conftest.frag conftest.in > conftest.out
  4873.   rm -f conftest.in
  4874.   mv conftest.out conftest.in
  4875. ' >> $CONFIG_STATUS
  4876.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  4877.   rm -f conftest.vals
  4878.   mv conftest.tail conftest.vals
  4879. done
  4880. rm -f conftest.vals
  4881.  
  4882. cat >> $CONFIG_STATUS <<\EOF
  4883.   rm -f conftest.frag conftest.h
  4884.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  4885.   cat conftest.in >> conftest.h
  4886.   rm -f conftest.in
  4887.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  4888.     echo "$ac_file is unchanged"
  4889.     rm -f conftest.h
  4890.   else
  4891.     # Remove last slash and all that follows it.  Not all systems have dirname.
  4892.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4893.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4894.       # The file is in a subdirectory.
  4895.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  4896.     fi
  4897.     rm -f $ac_file
  4898.     mv conftest.h $ac_file
  4899.   fi
  4900. fi; done
  4901.  
  4902. EOF
  4903. cat >> $CONFIG_STATUS <<EOF
  4904.  
  4905. EOF
  4906. cat >> $CONFIG_STATUS <<\EOF
  4907. \
  4908. test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h ; rm -f termlist
  4909. exit 0
  4910. EOF
  4911. chmod +x $CONFIG_STATUS
  4912. rm -fr confdefs* $ac_clean_files
  4913. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  4914.  
  4915.  
  4916.